# Help with math for a spherE

• Jan 11th 2012, 04:05 PM
Sneaky
Help with math for a spherE
If I have a sphere centered on (x,y,z) with radius r.
As well I have an object, lets call it A, sitting on the surface of the sphere, so the
distance from A to (x,y,z) is r.
Object A has an angle (which way it's facing), so the line that connects from A to some point (in its angle) A is looking at
is perpendicular to the line that connects A to (x,y,z).
Now given its current coordinate (x1,y1,z1) and say that A can move at a speed of k, how do I get the coordinate of the point
thats next in its trajectory (so its in the path of its angle), such that the distance of A to (x,y,z) will always be r, so its always touching the sphere?

Also the distance from its current point (n), to its next point (m) isn't supposed to be k, so for k, say you put a piece of string from n to m, then k is the length of the string. So basically it has to account for the curve of the sphere.

Thanks

In this picture, the angle of A is 45 degrees.

http://i.imgur.com/nwMZ8.png