Re: Unit vector -> (h,p,r) ?

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Tue, 3 Sep 1996 10:32:34 +0100


Without checking the math too closely (I usually get a sign wrong here
or there first time 'round) this should be p = pfArcTan2(z, pfSqrt(x*x+y*y)).

For pitch you can get away with atanf(degtorad * z/sqrtf(x*x+y*y)) since
you only have two quadrants to worry about (at least on the way out you do).
I'm not claiming that this is faster than pfArcTan2, infact I expect it'll
be slower.

Rgds,
Angus.

On Sep 2, 2:35pm, Jeremy Friesner wrote:
> Subject: Unit vector -> (h,p,r) ?

> h = pfArcTan2(x,y);
> p = pfArcTan2(z,y);
> r = ???;

>-- End of excerpt from Jeremy Friesner

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:30 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.