View Single Post
Old 8th April 2003, 20:34   #68
anubis2003
Forum King
 
anubis2003's Avatar
 
Join Date: Dec 2002
Location: middle of somewhere
Posts: 5,564
Send a message via AIM to anubis2003
You just tried making that way too difficult.
first off:
x=d*cos(r)
y=d*sin(r)

you can get this merely by looking at the triangle. R is the angle and d is the hypotenuse(sp). Simple trig tells you that
cos(r)=x/d
sin(r)=y/d

so those two equations are easy to derive.
then, using pythagorean theorem
d^2=x^2+y^2
Also simple.
and then
tan(r)=y/x
simple again.
anubis2003 is offline   Reply With Quote