where P
is your point, C
the point that should be the origin and A
the transformation matrix.
How can I rotate a 3D point about y-axis respect to the point C=(Cx, Cy, Cz)?
Pergunta
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?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow