Performer is rotating my axis!!

New Message Reply Date view Thread view Subject view Author view

Daniel F Johnston (dan.johnston++at++nrc.ca)
Fri, 26 Nov 1999 11:32:43 -0500


Hi group!

This is a longish message, but unless you are standing here looking at
the graphics, then it
takes a lot of words to describe the problem.

First the background (in case it matters). We have an ONYX2-IR2
deskside running IRIX 6.5.3m
and thus performer 2.2.4, C++, etc. We also have a 4 pipe monster with
12 CPUs and IR2+ graphics
pipes, but the software was developed on the deskside first.

Now the problem.
As we load geometry into our Performer application, it appears that the
reference axis of this
geometry get rotated. Thus when we move the geometry with translations
or rotations (via
dynamic DCSs set via sockets) the geometry does not move in the scene as

we expected. Let me
try to explain with geometry and software you can try at your sites.

Take some geometry... try the windmill.iv file for example. If you look

closely at the (ASCII)
version of the .iv file, you can see that the rotors of this model move
using a 'rotate around the
Z axis' command. This gives the positive Z axis as coming out from the
model, through the cylinder
which forms the hub for the blades, and then out to the 'blade
side'/front of the model. Further tests
will show that if you look down that axis, with the base of the mill at
the bottom of the screen, then
the positive X axis is to the right, and the positive Y axis is up.

Test this. Take a look at the file using ivview. You look down the Z
axis towards the origin. +X is
to the right, +Y is up. Turn the dials to rotate the model around the X

or Y axis to confirm this. We
also went further and added transforms to the .iv file to add
displacements - a displacement in +Y
made the model appear higher in the initial view, a displacement in +Z
made the model look closer
to the viewer. So far everything looks as we expected.

Now for Performer!
Look at the windmill.iv file with a Performer app such as
/usr/share/Performer/src/pguide/libpf/C++/simple.C

First you are looking at the front of the mill as your viewpoint begins
to rotate. According to
the Performer programming manual, the default viewpoint should be along
the +Y axis, looking
at the origin, with +Z up and +X to the right. I think that means the
model should appear as if
you were looking down at the top of the mill, the blades rotating around

the +Z axis which would
towards the top of the screen, and the +X axis would now have to be off
to the left. But this
is NOT what you see. It looks on the screen just as it did in the
ivview window. It appears to us
that the axis of the geometry has been moved/rotated by simply reading
it into Performer.

The simple.C program displays the geometry by rotating a viewpoint
around it. The hpr 'heading'
value is the variable - which implys a rotation around the Z axis. If
rotated around the geometry
Z axis, then the viewpoint would spin like the rotors of the mill.
Instead you revolve around
the long axis of the windmill. We think this is wrong! Please tell us
why it is not.

Our application creates a dynamic model of machgines which have
kinematic chains. We move
the 'machine's by translating/rotating the DCS that connect the geometry

along or around the
axis of that geometry. We first spotted the problem when we had to
specify a different axis
of rotation for some kinematic joints than what we expected. We can
live with this if we have
to - but it makes a big "hack" to calculate offsets for joints and so
on. Besides... it doesn't
make any sence to us and we do not know why!

Looking for enlightenment! Thanks in advance!

--
      ___|__    |
      /  |  \   ||\      Daniel (Dan) Johnston
     /___|___\  || \     Dan.Johnston++at++nrc.ca
    _____|____  ||  \    National Research Council of Canada, London, ON
    |    |    | ||   \   Integrated Manufacturing Technologies Institute
\___|    |    | ||____\  Tel: (519) 430-7081   Fax: (519) 430-7090
 \_o_\___|____|_|______\_    Inst: http://www.nrc.ca/imti
  \                o /    These opinions are my own! Not those of NRC.
   \________________/    Virtual Reality:
                        http://www.nrc.ca/imti/vetc/home.html
 More Tall Ships - Fewer Computers!

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Nov 26 1999 - 08:48:13 PST

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