Answer the question
In order to leave comments, you need to log in
Rotate square points?
Let's say there is a square. Now its rotation angle is 0. One of its points at angle 0 is at the coordinate (-0.5; 0.0; 0.5). Now let's say I want to rotate it by 45.0 degrees along R(otation)Y (Y height)
Here is the initial position (top view):
And these are the coordinates ? I need to find it based on an angle of 45.
Well, can I please use the formula for turning along RX, RZ (as I understand it, you need to play with sin cos tan somehow). Thanks everyone.
Answer the question
In order to leave comments, you need to log in
Instead of Y - substitute Z and get what you need.
Rotation around the center:
X = x * cos(alpha) - y * sin(alpha);
Y = x * sin(alpha) + y * cos(alpha);
General formula:
X = (x - x0) * cos(alpha) - (y - y0) * sin(alpha) + x0;
Y = (x - x0) * sin(alpha) + (y - y0) * cos(alpha) + y0;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question