0
$\begingroup$

Please let me know the formula for the point position rotated around an axis of a sphere.

In detail, I want to do as follows. Given:

  1. any point $p_1$ to decide the rotation axis ax of a sphere of ( radius r and center c);
  2. any point $p_2$ rotated around ax;
  3. any angle $angle$ as the measure of the rotation of the sphere around ax,

then compute the new position of $p_2$ by a formula.

Yes , I want the center c is at the origin and the rotation axis goes through p1 and c .

I found a rotation matrix formula at the bottom in the wikipedia page of "Rodrigues rotation formula ". Is it only for the special case as , the rotation axis goes through the origin?

Thank you very much.

  • 0
    It seems one would need to know the center of the sphere.2011-06-13
  • 0
    Are you assuming the center of the sphere is at the origin, and the axis of rotatioon will go through the origin and $p_1$?2011-06-13
  • 0
    Yes , I want the center c is at the origin and the rotation axis goes through p1 and c .2011-06-13

1 Answers 1

3

Use the Rodrigues rotation formula ${\rm Rot}[\vec{k},\theta,\vec{v}]$ for arbitrary axis.

$$\vec{p}_2 = {\rm Rot}[\vec{p}_1-\vec{c}, \theta,\vec{p}_2-\vec{c}] + \vec{c}$$

where $\theta$ is the angle.

  • 0
    Thank you very much for the answer.2011-06-13
  • 0
    I found a rotation matrix formula at the bottom in the wikipedia page of "Rodrigues rotation formula ". Is it only for the special case as , the rotation axis goes through the origin?2011-06-13
  • 0
    Thats why I subtract $\vec{c}$ and then add it again later.2011-06-16