Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting polar coordinates to rectangular coordinates

Convert angle in degrees to a point

How could I convert an angle (in degrees/radians) to a point (X,Y) a fixed distance away from a center-point.

Like a point rotating around a center-point.

Exactly the opposite of atan2 which computes the angle of the point y/x (in radians).


Note: I kept the original title because that's what people who do not understand will be searching by!

like image 757
Robin Rodricks Avatar asked Jan 29 '09 05:01

Robin Rodricks


1 Answers

Let the fixed distance be D, then X = D * cos(A) and Y = D * sin(A), where A is the angle.

like image 87
PolyThinker Avatar answered Sep 20 '22 01:09

PolyThinker