Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Even Distribution of Points on a Sphere

Kamak

New member
I'm trying to distribute 200 point evenly (as near as possible with anominal amount of points closest to 200)on the surface of a sphere in SolidWorks. I know of the Golden Section Spiral algorithm and some examples of code written for certain programs to calculate the coordinates of the points, but do not know how to apply it to a CAD program such as SolidWorks.


http://cgafaq.info/wiki/Evenly_distributed_points_on_sphere


http://www.enginemonitoring.org/illum/illum.html


http://www.xsi-blog.com/archives/115


60 Points:


vertices60.png



60 points:


Unfortunately I do not know how to use these programs that generate the individual x,y,z coordinates nor how to apply this algorithm to SolidWorks. Any detailed layman's help would be very appreciated.
Edited by: Kamak
 
vertices4.png
faces6.png
vertices6.png
faces12.png
vertices12.png

http://en.wikipedia.org/wiki/Platonic_solid
This really is a math problem. The deep understanding of geometry or topology is not my forte, nor do I want to delve into this discipline. I've quickly studied the realm of platonics, polyhedrons, packings and sphere geometry, but I'm no closer at understanding how to translate it into the SolidWorks platform. The simplest solution would be to find a program that did the calculations for me, and I just imputed the 3D coordinates into the model. Anyone know of a user friendly GUI program that can do this? I realize this is a very unique and rare problem and may not merit much attention nor have many people had the need to solve this type of problem.
Here is a Python implementation of the Golden Section spiral (I don't know how to use Python, maybe someone does):
import math

def pointsOnSphere(N):
N = float(N) # in case we got an int which we surely got
pts = []

inc = math.pi * (3 - math.sqrt(5))
off = 2 / N
for k in range(0, N):
y = k * off - 1 + (off / 2)
r = math.sqrt(1 - y*y)
phi = k * inc
pts.append([math.cos(phi)*r, y, math.sin(phi)*r])

return pts
 
Mike, I believe the 'geodesic subdivision' approach referred to in the first link given by you above is probably your best bet.


By a technique similar to that,thesemi-regular solidcalled a 'truncated icosahedron' can be modified to have 180 similar triangular faces.


Andthe shapecalled a 'snub cube' can be modified to have224 similar triangular faces.


By a similar sub-division technique - but not using triangles - one of the vertically regular Archimidean duals can be modified to have 192 similar faces.


I have quite a lot of experience making models based on spherical geometry, designed in Solidworks, and manufactured by CNC based directly on the SolidWorks model data.


I'm a professional industrial designer with a prototyping capability based on Solidworks, SprutCAM, a ShopBot and a Microkinetics Express Mill - and I love geometrical work!


If you want to save yourself some geometry head-aches, you might consider getting me on boardfor whatever this project is! It sounds intriguing.


I can be contacted at [email protected]
 
Unfortunetly this is not a paying gig. It is a educational exercise for me. Any free help would be helpful!





Mike C
 
OK boys and Girls,


I'm almost there. I've investigated into polyhedral algorithms and code designs and found a really nice Python script written by Simon Tatham ( Please see if interested his site: http://www.chiark.greenend.org.uk/~sgtatham/polyhedra/) I've figured out how to execute a Python script file and got back a data table for 200 evenly distributed points (x,y,z) on the surface of a sphere.


Now comes the easy yet potentially painful part... entering these "points" in 3D SW model space. I am not familiar with using design tables, so if there is a way to input these 200 x,y,z point coordinates through an equation driven method or design table insertion, I'd love to know how!


Please Help


M Colbourne
 
It Dawned on me. What I need is a Macro! how do I write a macro that places these points (from my Excel table of 200 x,y,z coordinates) in 3D space?????





All The help Will be greatly appreciated





Mike C
 
Mike, I've madea (free) SolidWorks 2009 .sldprt file thatcontains a line radiating from the origin to a far end who's X, Y and Z coordinates can be controlled by a design table.


Basically it consists of a 3D Sketch that has a line in X controlled by a dimension, a line inY controlled by a dimension, a line inZ controlled by a dimension, and a 'slave' line that joins from the origin to the end of the Z line.


By modifying the dimensions of the X, Y and Z dimensions, the 'slave' element in the sketch gets pointed wherever you want.


There would be a number of ways with working withthe concept used in thisfile. An assembly could be set up with 200 'parts' like this inside it (each 'part' would only contain a 3D Sketch), or a single .sldprt could contain all 200 3D Sketches.


I haven't tried this - the easiest way might be with either a tetrahedron or a cube -but ifyou create a reference plane perpendicular to the end of the 'slave' line and sketch a circle on it (on all of them) you may be able to set the circle's size by making it tangent to its neighbours. This works in 2D, but may not work in 3D.


I can pass you the file if you contact me by e-mail as indicated in my earlier post.
 

Sponsor

Articles From 3DCAD World

Back
Top