pfChanView with incremental rotations

New Message Reply Date view Thread view Subject view Author view

Monica Paolini (paolini++at++neurobiologie.ruhr-uni-bochum.de)
Tue, 27 Oct 1998 11:53:44 +0100 (CET)


Hi,

in my application I have a fixed environment and have the viewpoint
moving in different directions or rotating by updating the viewpoint
coordinates at each frame with pfChanView.

I know in which direction, relative to the viewpoint, the camera
has to move. Of course, pfChanView changes the viewpoint with
respect to the fixed coordinate system (xyz, hpr) only.

My first question is: is it possible in performer to change the
viewpoint in a way which is relative to the viewpoint? E.g. if
the camera is pointing downwards, then if I want to "see" a rotation,
I have to change r and not (as it is with pfChanView) h.

The second question is about rotation. If I have the viewpoint pointing
in some direction (as a result of a previous rotation), I simply have to
rotate the vector describing the motion of the camera to obtain the desired
motion (i.e. to convert from viewpoint dependent to performer fixed coords).
With respect to rotations things get trickier and I would like to know
if someone knows to do deal with this problem. Because the order of
application of rotation components is r->p->h, I cannot simply add r, because
that will affect p and h.

Here is an example of what I mean. Suppose you turn about x (p) and then
about z (h). You are now facing downwards (assuming 90 deg moves). Suppose
now you want to add an additional 90 deg rotation about z/h (I am using here
the fixed performer coords). Well, you cannot simply add the additional z/h
rotation, because the way performer does, the order of rotation is r, p and
then h, so you cannot simply add additional rotations and have as a result
the type of motion expected if the additional rotation was added to the
0,0,0 position. In my example you'd get a rotation of 180 deg about z,
followed by a 90 deg rotation about h, instead of a rotation of 90r+90h+90r.

I am sure this is a common problem --any help will be appreciated.

Monica

____________________________________________________________________________
Monica Paolini, PhD paolini++at++neurobiologie.ruhr-uni-bochum.de
Allg. Zoologie und Neurobiologie 1-49-234-700-7008
ND7/31
Ruhr Universitaet Bochum
D44780 Bochum http://phaistos.ucsd.edu/~paolini
Germany http://homepage.ruhr-uni-bochum.de/Monica.Paolini


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Oct 27 1998 - 03:04:19 PST

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