## Need help with a sphere

Geometric formulae, word problems, theorems and proofs, etc.
TheWebExpert
Posts: 1
Joined: Wed Jun 24, 2015 7:08 am
Contact:

### Need help with a sphere

I have created a circle with points; this wasn't that hard. Now, I want to create a sphere using points. This is what I have so far:

angle = whatever value
radians = angle * pi / 180
z = zOrigin

rho =sqrt {x^2 + y^2 + z^2}
theta = arccos(z / sqrrt {x^2 + y^2 + z^2}} )
phi = arctan( y * x )

ResultX = rho *cos(phi)*sin(theta)
ResultY = rho *sin(phi)*sin(theta)
ResultZ = rho *cos(theta)

I'm not sure if I'm on the right track or not. I've taken the sixteen points I generated for the original circle & plugged those x, y, z coordinates into the second formula. What I seemed to get was two arcs, not a circle, and I'm not sure what I'm doing, if I just need more points or what. What I thought I'd get was a circle, then I'd change something, then have another circle at a slightly different angle, etc., making a sphere... but I really don't know. Can anyone help me straighten this mess out?? I know absolutely NOTHING of geometry, trigonometry, or algebra, although I do understand some of the basics.

I'm trying to draw the sphere using points; I am using Excel to generate the individual points on the surface of the sphere. I will then take these coordinates to port into Minecraft (which is using relative coordinates).

buddy
Posts: 197
Joined: Sun Feb 22, 2009 10:05 pm
Contact:

### Re: Need help with a sphere

I have created a circle with points; this wasn't that hard. Now, I want to create a sphere using points.
I'm not really sure what you're doing, but maybe spherical coordinated might help (here).

You know the center and radius from the circle. Can you plug these into spherical coordinates to get the whole sphere?

By the way, maybe the arcs (instead of full circles) came from using only one cycle of the inverse tangent?