I come accross a math problem about Interactive Computer Graphics. I summarize and abstract this problem as follows:
I'm going to rotation a 3d coordinate P(x1,y1,z1) around a point O(x0,y0,z0)
and there are 2 vectors u and v which we already know.
u is the direction to O before transformation.
v is the direction to O after transformation.
I want to know how to conduct the calculation and get the coordinate of Q
Thanks a lot.
Solution:
Rotation About an Arbitrary Axis in 3 Dimensions using the following matrix:
rotation axis vector (normalized): (u,v,w)
position coordinate of the rotation center: (a,b,c)
rotation angel: theta
Reference:


P(x1-x0, y1-y0, z1-z0)around the origin(0,0,0)to yieldP*. Then translate, where:Q = P* + O(x0,y0,z0). (If this piques your interest, it might be time to learn about coordinate transforms, matrices, and the notion of points vs. vectors.) - Brett Hale