I am trying to produce a collection of lines radiating out from a central point to the surface of a sphere. I have no idea how to achieve this, but am working with the concept of connecting a point at the center of the sphere with the vertices of a mesh I made from the sphere surface. But I cannot do this manually…
If the vertices of the mesh are at equal angle increments around the center of the sphere, then create 1 line from the center to a pole, use ArrayPolar with the line to create a fan of lines, and then use ArrayPolar with the fan of lines to create lines to each vertex. Use SelDup and Delete to delete the duplicate lines.
This is where scripting or Grasshopper can come in handy - here’s a python script that will do this:
import rhinoscriptsyntax as rs
import Rhino
def RadialMeshLines():
id = rs.GetObject("Select a mesh.", 32, preselect=True)
if not id: return
mesh = rs.coercemesh(id)
pt = rs.MeshVolumeCentroid(id)
rs.EnableRedraw(False)
for v in mesh.Vertices:
rs.AddLine(pt, v)
rs.EnableRedraw(True)
RadiaMeshlLines()
You can copy/and paste that into a session of EditPythonScript, for example and run it from there to get an idea how it works, or paste to a text editor and save it as a .py file and use RunPythonScript