Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find new coordinates of a point after rotation [closed]

Tags:

math

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..

like image 797
Mahavir Nahata Avatar asked Nov 20 '13 19:11

Mahavir Nahata


People also ask

How do you calculate new coordinates 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 ⁡

How do you find the coordinates after a 90 degree rotation?

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)


1 Answers

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
like image 68
Matt Avatar answered Dec 03 '22 02:12

Matt