1. ## moving on sphere

Hi guys. I'm trying to simulate ( with a computer program ) the movement of an object on a sphere. The data are as this : The sphere has a radius R and it's center is at (0,0,0). There is an object at point P(x0,y0,z0) or in polar coordinates defined as P(phi,theta). The object can rotate around it's own axis ( at the tangent plane of the sphere in the point (x0,y0,z0) and it can move by a distance "dist" along the great circle ( geodesic ) defined by the point P and the direction of the rotation around its axis. My problem is to define the equations that govern this type of movement.

What i have done till now is this :

i defined an angle called "chi" which is the direction the object is "looking at", the rotation around its axis. i also have a "unit" vector which let's say vec=(0,0,1) which gets added to the P thus producing the new point P1. I have the rotation matrix of a point around an axis and this is fine. The problem is each time the object moves, "vec" must rotate appropriately so that it is perpendicular to the vector P. Any help would be appreciated.

2. Originally Posted by Mirror
... the movement of an object on a sphere. The data are as this : The sphere has a radius R and it's center is at (0,0,0)....

What i have done till now is this :

i defined an angle called "chi" which is the direction the object is "looking at", the rotation around its axis. i also have a "unit" vector which let's say vec=(0,0,1) which gets added to the P thus producing the new point P1. I have the rotation matrix of a point around an axis and this is fine. The problem is each time the object moves, "vec" must rotate appropriately so that it is perpendicular to the vector P. Any help would be appreciated.

1. With your unit vector the object leaves the surface of the sphere.

2. All vectors which describe the direction the object is "looking at" form a plane (the tangent plane at P with the vector $\displaystyle \overrightarrow{OP}$ as it's normal vector. Let $\displaystyle \vec q$ be the stationary vector pointing at an arbitrary point in the tangent plane and let $\displaystyle \vec p$ be the staionary vector pointing at P and since you know the coordinates of P the equation of the tangent plane in P would be:

$\displaystyle \overrightarrow{OP} \cdot (\vec q - \vec p)=0~\implies~\vec p \cdot \vec q - (\vec p)^2=0$ and $\displaystyle |\vec p| = R$

3. Originally Posted by earboth
1. With your unit vector the object leaves the surface of the sphere.
i forgot to mention that i normalize the new vector and then multiply it by R so it doesn't leave the sphere.

Originally Posted by earboth
1. With your unit vector the object leaves the
2. All vectors which describe the direction the object is "looking at" form a plane (the tangent plane at P with the vector $\displaystyle \overrightarrow{OP}$ as it's normal vector. Let $\displaystyle \vec q$ be the stationary vector pointing at an arbitrary point in the tangent plane and let $\displaystyle \vec p$ be the staionary vector pointing at P and since you know the coordinates of P the equation of the tangent plane in P would be:

$\displaystyle \overrightarrow{OP} \cdot (\vec q - \vec p)=0~\implies~\vec p \cdot \vec q - (\vec p)^2=0$ and $\displaystyle |\vec p| = R$
i solved the problem by using the binormal ( crossproduct of the OP and OV ) and rotating the OV along the OB ( binormal vector ).