Suppose i have a rectangle of dimension w*h , and let there is an arbitrary point inside this rectangle at position (x,y) , now i rotate this rectangle to X degree, What will be the new position of that arbitrary point after rotation..
Finding the Coordinates of a Polygon After a RotationStep 1: Find and label all vertices of the original polygon. Step 2: Find the coordinates of the vertices of the rotated polygon using the formulas: x′ → xcos(θ)−ysin(θ) x ′ → x cos ( θ ) − y sin
Here are the rotation rules: 90° clockwise rotation: (x,y) becomes (y,-x) 90° counterclockwise rotation: (x,y) becomes (-y,x) 180° clockwise and counterclockwise rotation: (x, y) becomes (-x,-y)
The new coordinate (x',y') is a result of the standard rotation formula:
y' = y*cos(a) - x*sin(a)
x' = y*sin(a) + x*cos(a)
where a is the angle of a clockwise rotation. This assumes the (x,y) is given with respect to the center of rotation. In other words, (0,0) is the center of rotation.
Most sin/cos functions require the angle to be in radians. In that case, use this conversion formula if X is in degrees:
a = X * pi / 180
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With