Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
    
It seems one would need to know the center of the sphere. –  Did Jun 13 '11 at 5:49
    
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$? –  Arturo Magidin Jun 13 '11 at 5:53
    
Yes , I want the center c is at the origin and the rotation axis goes through p1 and c . –  seven_swodniw Jun 13 '11 at 6:11

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
Thank you very much for the answer. –  seven_swodniw Jun 13 '11 at 11:25
    
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? –  seven_swodniw Jun 13 '11 at 17:59
    
Thats why I subtract $\vec{c}$ and then add it again later. –  ja72 Jun 16 '11 at 14:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.