Subject: relations ...

From: [email-masked] (michelangelo rubini)
Date: Thu, 23 Jul 1992 18:32:25 +0930

I noted that view point has  x , y , z  and tilt, pan, and roll.  I noted that
object has relative x , y , z,  but is there relation with an object with tilt, pan , and roll ?  
What Im trying to say is .. lets say there is an opponent, who is represented
as a head ... can I "tilt, pan and roll" the object as easily as his view point ?
cheers miker

---

From: Dave Stampe-Psy+Eng <dstamp@watserv1>
Date: Thu, 23 Jul 92 10:41:17 -0400

> From [email-masked] Thu Jul 23 05:04:15 1992
> From: [email-masked] (michelangelo rubini)
> To: rend386@sunee
> Subject: relations ...
> 

Tutorial time...

Basically, REND386's rotates are done in this order: pan (rotate around
y axis), tilt (rotate around the new x axis) and roll (rotate around new
z axis, which is the line of view).   Looking along the z axis (from the
origin into the positive z direction) y goes up, x goes right.

Now the pan, tilt and roll for an object do exactly this to every point
in the world.  The ry, rx, and rz (note order) do this to every point
on an object, thus rotating it.  Obviously this is a non-Abelian system of rotates, so sequential rotates may result in strange configurations (which is
one reason to add and subtract rotation angles rather than performing
sequential rotates).

Obviously, the effect of rotating an object has the exact opposite effect
of the view angles.  To make these work, use the matrix forms of viewpoint
setting.  (Unfortunately there's a slight bug in DEMO3, but the upcoming
release fixes that).  You basically must use the INVERSE of the head-object
rotation to rotate the scene points, and the new release does that.  It also
lets the viewpoint be part of a segmented figure, so we can have real
body-like relations between glove and viewpoint (we needed to add this to
get the HMD system going).

Now, REND386 is a lefthanded coordinate system, but some of the angle
ditections (rx, ry, rz) may be opposite to the usual convention but
I've never bothered to find out so far.  In any case, just negate the angles till they work.  The next release will have a (floating point) routine to
convert a matrix back to angles, so this should help with some of the
complex stuff.

Anyway, the upcoming release has most of the tools you'll need.  But feel 
free to experiment...

- Dave Stampe