Math help, degrees to normals
by Erik Madison · in Technical Issues · 02/08/2005 (12:43 pm) · 2 replies
Minus a nasty looking if/else, is there a proper way to find my info?
I have degrees of 0-360, I need a Point3F normal, with the values being -1, 0 or 1.
In case I'm not clear :)
a degree of 315-45 is (1, 0, 0) Facing generally forward on the x axis.
I have degrees of 0-360, I need a Point3F normal, with the values being -1, 0 or 1.
In case I'm not clear :)
a degree of 315-45 is (1, 0, 0) Facing generally forward on the x axis.
About the author
#2
02/08/2005 (1:14 pm)
Thats beautiful, thanks! I tested it just as typed, and it output exactly what I needed. My last Trig course was 30 years ago....
Torque Owner Brian Richardson
X= R * cos(Theta)
Y= R * sin(Theta)
Make sure your theta is converted to radians, or your cos/sin functions take degrees. Also, in your case, just use 1 for R. (Or just omit it.)
Hope that helps.