Given a point $P$ with coordinates $(P_x,P_y,P_z)$ on the sphere $$(x-a)^2 +(y-b)^2 +(z-c)^2 = R^2$$ and a line with equation $$\frac{x-x_1}{x_2-x_1}=\frac{y-y_1}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}.$$ where $(x_1,y_1,z_1)$ and $(x_2, y_2, z_2)$ are the two points determining the line. How do I obtain the new coordinates of the point $P$ after rotation about the line on angle $\theta$ such that the point stays on the sphere?
Rotation on a sphere and change in coordinates
-
1presumably you want $x_1 = a$, $y_1 = b$, and $z_1 = c$ so that the line actually goes through the center of the sphere (and so is a symmetry axis)? – 2012-11-07
-
0No, the line is arbitrary. The point rotates around the line in such a way that it always stays on the sphere. – 2012-11-07
-
0Then I am afraid I have no idea what you mean by "rotates around the line in such a way that it always stays on the sphere". If you are not restricting it using any sort of symmetry, there are uncountably many circle actions on the sphere. Hence there isn't just "the" new coordinates of the point $P$; point $P$ can be practically anywhere on the sphere. – 2012-11-08
-
0Dear Willie, you are right. Could you tell me the new coordinates in the case you mentioned - when the line is passing through the center of the sphere. – 2012-11-08
1 Answers
[Edit: the following answer addresses the case of the line through the center of the sphere.]
Note: there is an ambiguity due to the fact that "angle $\theta$" does not specify which way the rotation is going (you can call the North Pole the South Pole, and suddenly the Earth rotate in the other way!)
What I will assume is that you are given the center $(a,b,c)$ of the sphere and a vector $(\alpha,\beta,\gamma) \neq (0,0,0)$ so that $x_2 = a + \alpha$, $y_2 = b + \beta$, and $z_2 = c + \gamma$. We shall assume the rotation is right handed relative to the vector $(\alpha,\beta,\gamma)$, that is, if you look along the direction given by $(\alpha,\beta,\gamma)$, the rotation is clockwise. Note that for any $\lambda \neq 0$, $(\alpha,\beta,\gamma)$ and $(\lambda \alpha,\lambda\beta,\lambda\gamma)$ determine the same line. But if $\lambda < 0$ their rotational directions are opposite.
For convenience we will require that the vector $(\alpha,\beta,\gamma)$ is a unit vector, that is $\alpha^2 + \beta^2 + \gamma^2 = 1$. We can always get this by dividing the vector by its length.
Then we can use this formula here plus a translation: a point $(x,y,z)$ is sent to $$ \begin{pmatrix} x \\ y \\ z\end{pmatrix} \mapsto \begin{pmatrix} a \\ b \\ c\end{pmatrix} + \begin{pmatrix} \cos \theta + (1 - \cos \theta)\alpha^2 & \alpha\beta(1-\cos\theta) - \gamma \sin\theta & \alpha\gamma(1-\cos\theta) + \beta \sin\theta \\ \alpha \beta(1-\cos\theta) + \gamma \sin\theta & \cos\theta + (1-\cos\theta)\beta^2 & \beta\gamma(1-\cos\theta) - \alpha\sin\theta\\ \alpha\gamma(1-\cos\theta) - \beta \sin\theta & \beta\gamma(1-\cos\theta) + \alpha\sin\theta & \cos\theta + (1-\cos\theta) \gamma^2 \end{pmatrix} \begin{pmatrix} x - a \\ y - b \\ z - c\end{pmatrix} $$
-
0Thank you. But when we rotate the point about a line through the center, the point always stays on the sphere. Going back to my initial question when the line is arbitrary.If we rotate the point with some angle, then it will leave the sphere. But the line connecting the image of the point with the center of rotation will meet the sphere at some point $P'$. This point is the image of our initial point on the sphere after the rotation. How can I get the coordinates of it? – 2012-11-09
-
0@Adam: _that_ detail is something that you should've mentioned in your original post after my second comment. `:-)`. Can you edit it into your question so it will be clearer to the readers? – 2012-11-09
-
0@Adam: hang on: the statement "But the line connecting the image of the point with the center of rotation will meet the sphere at some point $P'$" is not true. Let the sphere be the unit sphere centered around $(2,0,0)$. Let the line of rotation to be the $z$ axis. Let the angle be $\pi/2$. If the initial point is $P = (3,0,0)$ it gets rotated to $P' = (0,3,0)$. Any line through $P'$ and the $z$ axis will lie in the $y$-$z$ plane and will _not_ intersect the sphere. Do you mean instead "... the line connecting the image with the center of the sphere..."? – 2012-11-09
-
0Dear Willie, no I didn't mean that. I got confused. I have one more question. If we consider the same problem in spheric coordinates ($P(r,\phi, \psi)$ what will be the transformation that gives the new coordinates $P_1(r, \phi_1, \psi_1)$? – 2012-11-12
-
0@Adam: through an arbitrary center point of spherical coordinates that is not tied to the given sphere or the line? The answer would be messy. You are probably better off converting to rectangular coordinates and then converting back after you do the transformation. – 2012-11-12
-
0Dear Willie, I think you got me wrong. I meant the case when the line passes through the center of the sphere but the point P is presented in spherical coordinates. What is the transformation in this case? Thank you. – 2012-11-12
-
0@Adam: no, that's a subcase of what I wrote. If the line passes through the center of the coordinate system _and_ the center of the sphere, then you can just do it in cylindrical/spherical coordinates adapted to the direction of the line. Otherwise it will be very messy. – 2012-11-20