0

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.

1 Answers1

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.

John Alexiou
  • 13,816