problems with pfuPath routines

New Message Reply Date view Thread view Subject view Author view

BLANCHARD++at++mclapo.apo.saic.com
Wed, 14 May 1997 9:48:00 -0400


Hi everyone!

I'm developing a missile flyout simulation and choose to use the pfuPath
routines to define and follow the path, but we had some difficulties
with the values returned from pfuFollowPath (especially when following
an arc section of the path).

First off, the returned 'where' is just fine (the updated position of
the object following the path). It's the 'orien' returned values that
are the problem...

It looks like the orien values are the spherical coordinate equivalent of
the where coordinates. In other words...

orien[0] = arcTan(where[1] / where[0])
AND
orien[1] = arcCos(where[2] / sqrt(sqr(where[0]) + sqr(where[1]) + sqr(
                                                         where[2])))

EXCEPT that orien[1] is calculated with an 'arcTan' instead of the
needed 'arcCos' in the pfuFollowPath routine. Is this a known bug, or
are we just crazy? Our work around is that we include the following
line right after the call to pfuFollowPath:

orien[1] = pfArcCos(pfTan(orien[1]));

Another thing I don't understand is that when the pfuFollowPath routine
goes into an arc segment, the orien[0] value wants to perform
unnessary heading changes. For example, if the path is a constant
heading (in a plane), when the path gets to an arc segment the heading
will rotate 180 to 270 degrees and end up at the proper heading by the
end of the arc segment. Has anyone else noticed this behavior? Any
work arounds?

I'm using Performer 2.1 on an Onyx deskside Infinite Reality 10000
running 6.2. Thanks for any help.

--Paul
=======================================================================
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:55:13 PDT

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