The transition of objects
So, I converted all the struct defs to 3d by adding the 3d coordinated.
The spherical implementation
So I had to figure out how I could draw a sphere to start off.
I had to consider that we now have 2 angles that we have to utilize.
I can get the three coordinates by doing:
x = r * cos(theta) * cos(phi)
y = r * cos(theta)
z = r * sin(phi) * cos(theta)
To do this we need to first calculate the two angles phi and theta:
theta = r( determined by loop) / rings * pi
phi = s(determined by loop) / sectors * 2 * pi
theta is the angle rotating in a motion containing the z axis
while phi is rotating around the z axis.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.