From: Colin Middleton (colin++at++sgi.com)
Date: 09/24/2002 03:25:50
Bram,
For the sake of clarity I am calling your local camera axes i, j and k which
correspond to its local x,y,z coordinate directions.
i,j and k hold the following relationships as they must be orthogonal
i = j x k
j = k x i
k = i x j
In order to confine i to the global xy plane for an arbitary value of j.
You generate j ( where you want to point ).
k = ( 0,0,1 )
i = j x k
Then normalize i.
k = i x j
This will not work when j is close to (0,0,1).
Colin
___________________________________________
Colin Middleton,
SGI Professional Services,
1530 Arlington Business Park,
Theale, Reading, Berks. RG7 4SB.
United Kingdom.
Tel: +44 (0)118 9257692
Mobile: +44 (0)780 1623221
email: colin++at++sgi.com
NB: information in this message is SGI confidential. It is intended solely
for the person(s) to whom it is addressed and may not be copied, used,
disclosed or distributed to others without SGI consent. If you are not the
intended recipient please will you notify me by email or telephone, delete
the message from your system immediately and destroy any printed copies.
> -----Original Message-----
> From: Bram Stolk [mailto:bram++at++sara.nl]
> Sent: 24 September 2002 10:04
> To: info-performer++at++sgi.com
> Subject: [info-performer] removing roll from camera without
> resorting to
> the use of euler angles
>
>
> Hello,
>
>
> I have a 3d math question:
>
> I am trying to remove roll from an arbitrary camera transformation.
> My camera points to +y, so basically I need to remove the
> z-component in
> the x-axis, and reconstruct a new x and z axis perpendicular to my
> y-axis.
>
> How can I force the x-axis of my cam trf to lie in the xy-plane
> without disturbing my original y-axis?
>
> My original approach of projecting x onto xy, and then
> z = cross(x,y) is not enough, as x and y no longer form a 90
> degree angle after projection. Adding an additional x=cross(y,z)
> re-introduces the z component in the x-axis that I was trying to
> remove.
>
> Note: I try to avoid the obvious approach of using Euler angles,
> as Euler angles are evil, as pointed out by Steven Baker (and quite
> rightly so):
> http://www.sjbaker.org/steve/omniv/eulers_are_evil.html
>
> Thanks,
>
> Bram Stolk
>
> --
> --------------------------------------------------------------
> ----------------
> Bram Stolk, VR Specialist.
> SARA Academic Computing Services Amsterdam, PO Box 94613,
> 1090 GP AMSTERDAM
> email: bram++at++sara.nl Phone +31-20-5923059 Fax +31-20-6683167
>
> "I heard if you play the NT-4.0-CD backwards, you get a
> satanic message."
> "Thats nothing, if you play it forward, it installs NT-4.0"
> --------------------------------------------------------------
> ----------------
>
> --------------------------------------------------------------
> ---------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> --------------------------------------------------------------
> ---------
>
This archive was generated by hypermail 2b29 : Tue Sep 24 2002 - 03:25:57 PDT