For example, let's say I have P0 = (x, y, z) and I want to rotate it about y-axis with respect to the point C = (Cx, Cy, Cz)
I know that the rotation matrix to apply is:
{ {cos(angle),0,sin(angle),0}, {0,1,0,0}, {-sin(angle),0,cos(angle),0}, {0,0,0,1} }
But this matrix would be used in case of rotating with respect to (0,0,0), right?
How can I do it respect to a different point?
where
P
is your point,C
the point that should be the origin andA
the transformation matrix.