Advertisement

How do you convert radians to cartesian coordinates

Started by January 24, 2003 05:00 PM
2 comments, last by LostBoy 22 years ago
How do you do this in C++ ? I know that atan2 does the opposite of this, so what I am looking for is how to "undo" what atan2 does so that I have the x,y coordinates again.
x = cos(a);
y = sin(a);
Advertisement
The more general form is that if you have a point at (r,t,w) (that is: radius, theta, omega/rho) then x = cos(theta), y = sin (rho) and z = sin(theta). In a 2d coordinate system you can assume y = z and rho = 0.

-- Exitus Acta Probat --
I thought it was:

x = r cos(theta)
y = r sin(theta)

where r is equal to the radius and theta is your angle. The above suggested equation will give you coordinates ina very small part of the cartesian plane (unless that''s what the orginal poster wanted anyway) Sorry if I''m wrong about this

Peon
Peon

This topic is closed to new replies.

Advertisement