Article View: comp.sys.sgi.graphics
Article #21Re: Question about "lookat"
From: dave "who can do? ratmandu!" rat...
Date: Tue, 29 Dec 1992 21:56
Date: Tue, 29 Dec 1992 21:56
64 lines
3065 bytes
3065 bytes
In article <1992Dec16.215009.24896@Princeton.EDU> smulgund@phoenix.Princeton.EDU (Sandeep Shriram Mulgund) writes:
>I'm trying to use a 4D/35 Iris running under Irix 4.0.5 to generate an
>out-of-window display for a flight simulator. I'm having trouble trying
>to relate the angles that define the aircraft's orientation with the
>parameters of the "lookat" command. Specifically, there's an argument
>to lookat called "twist" that defines the angle of twist about the line
>of sight. I haven't for the life of me been able to figure out what
>this variable really is, and how it relates to other variables I do know.
>Does anybody out there have any experience using this command? Any help
>would be appreciated.
>
>Thanks!
lookat has caused confusion for many people. check out
/usr/people/4Dgifts/examples/grafix/{upat-main.c, upat.c}
for a tres swank alternative to lookat. from the grafix dir's README:
--> upat.c, this set implements an alternative approach to
upat-main.c LOOKAT(3G) where, instead of viewing the scene
with the default up-axis being Y, the user can
easily specify the up-axis in any direction desired.
upat-main.c's top:
*
* NOTE: the core routine itself--upat--exists separately in the upat.c
* file. this is so that it can be employed more easily as a
* stand-alone module.
*
upat.c's top:
/*
* upat.c:
*
* This module contains all the code necessary to hook the routine upat()
* into any application wanting to take advantage of "user-defined up-axis"
* functionality. Excluding its seventh parameter--twist--upat() can be
* thought of as a superset of the LOOKAT(3G) function (the first six
* parameters are identical to the first six parameters of LOOKAT(3G)).
*
* C SPECIFICATION
* void upat(vx, vy, vz, px, py, pz, ux, uy, uz)
* float vx, vy, vz, px, py, pz, ux, uy, uz;
*
* PARAMETERS
* vx, vy, vz is the viewpoint, the point the eye is looking from
* px, py, pz is the reference point, the point the eye is looking at
* ux, uy, uz is the up vector
--
daveus rattus
yer friendly neighborhood ratman
KOYAANISQATSI
ko.yaa.nis.qatsi (from the Hopi Language) n. 1. crazy life. 2. life
in turmoil. 3. life out of balance. 4. life disintegrating.
5. a state of life that calls for another way of living.
Technical Details
Message-ID:
<1992Dec29.215603.28723@odin.corp.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!sgigate!odin!daveReferences:
<1992Dec16.215009.24896@Princeton.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!sgigate!odin!dave From: dave@sgi.com (dave "who can do? ratmandu!" ratcliffe) Newsgroups: comp.sys.sgi.graphics Subject: Re: Question about "lookat" Message-ID: <1992Dec29.215603.28723@odin.corp.sgi.com> Date: 29 Dec 92 21:56:03 GMT References: <1992Dec16.215009.24896@Princeton.EDU> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Lines: 64 Nntp-Posting-Host: ratmandu.esd.sgi.com