Figuring points on a sphere

I have been prompted to place large quantities of cubes in the shape of a sphere, and they are to rotate. I can do the rotations, but how should I go about determining the Vector3f on which every cube should lie?



This is to be done in Java3D, but I'm sure all of the math is the same…

Well, you can simply look at com.jme.scene.shape.Sphere.java, and where it would create a point you will add a box.



You can do it with basic trig, just divide the sphere in to segments like longitude and latitude.

Then you just have to divide up two circles, into however many segments you want.

Gives you and angle and you already know the radius (every point is the same distance from the centre) so the rest can be done with basic trig.