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

New Message Reply Date view Thread view Subject view Author view

Jeremy Friesner (jaf++at++chem.ucsd.edu)
Mon, 2 Sep 1996 14:35:25 -0700 (PDT)


Hi all,

This question probably has a very obvious answer, but for
some reason it is eluding me:

What is a good reliable way to transform a unit vector (x,y,z) representing
a direction back into (h,p,r) form? I can sort of do this by doing

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

but this only seems to give the correct results in some cases. (And
I don't believe there is a way to reconstruct r!)
  
Thanks for any help,
Jeremy

jfriesne++at++chem.ucsd.edu
=======================================================================
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.