home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / graphics / 66 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  2.9 KB

  1. Path: sparky!uunet!olivea!sgigate!odin!dave
  2. From: dave@sgi.com (dave "who can do? ratmandu!" ratcliffe)
  3. Newsgroups: comp.sys.sgi.graphics
  4. Subject: Re: Question about "lookat"
  5. Message-ID: <1992Dec29.215603.28723@odin.corp.sgi.com>
  6. Date: 29 Dec 92 21:56:03 GMT
  7. References: <1992Dec16.215009.24896@Princeton.EDU>
  8. Sender: news@odin.corp.sgi.com (Net News)
  9. Organization: Silicon Graphics, Inc.
  10. Lines: 64
  11. Nntp-Posting-Host: ratmandu.esd.sgi.com
  12.  
  13. In article <1992Dec16.215009.24896@Princeton.EDU> smulgund@phoenix.Princeton.EDU (Sandeep Shriram Mulgund) writes:
  14. >I'm trying to use a 4D/35 Iris running under Irix 4.0.5 to generate an
  15. >out-of-window display for a flight simulator.  I'm having trouble trying
  16. >to relate the angles that define the aircraft's orientation with the
  17. >parameters of the "lookat" command.  Specifically, there's an argument
  18. >to lookat called "twist" that defines the angle of twist about the line
  19. >of sight.  I haven't for the life of me been able to figure out what
  20. >this variable really is, and how it relates to other variables I do know.
  21. >Does anybody out there have any experience using this command?  Any help
  22. >would be appreciated.
  23. >
  24. >Thanks!
  25.  
  26. lookat has caused confusion for many people.  check out
  27.  
  28. /usr/people/4Dgifts/examples/grafix/{upat-main.c, upat.c} 
  29.  
  30. for a tres swank alternative to lookat.  from the grafix dir's README:
  31.  
  32.   -->  upat.c,           this set implements an alternative approach to
  33.        upat-main.c       LOOKAT(3G) where, instead of viewing the scene
  34.                          with the default up-axis being Y, the user can
  35.                          easily specify the up-axis in any direction desired.
  36.  
  37. upat-main.c's top:
  38.  *
  39.  *  NOTE:  the core routine itself--upat--exists separately in the upat.c
  40.  *         file.  this is so that it can be employed more easily as a
  41.  *         stand-alone module.
  42.  *
  43.  
  44. upat.c's top:
  45. /*
  46.  *   upat.c:
  47.  *
  48.  *    This module contains all the code necessary to hook the routine upat()
  49.  *  into any application wanting to take advantage of "user-defined up-axis"
  50.  *  functionality.  Excluding its seventh parameter--twist--upat() can be
  51.  *  thought of as a superset of the LOOKAT(3G) function (the first six
  52.  *  parameters are identical to the first six parameters of LOOKAT(3G)).
  53.  *
  54.  * C SPECIFICATION
  55.  *     void upat(vx, vy, vz, px, py, pz, ux, uy, uz)
  56.  *     float vx, vy, vz, px, py, pz, ux, uy, uz;
  57.  *
  58.  * PARAMETERS
  59.  *     vx, vy, vz   is the viewpoint, the point the eye is looking from
  60.  *     px, py, pz   is the reference point, the point the eye is looking at
  61.  *     ux, uy, uz   is the up vector
  62.  
  63.  
  64.  
  65.  
  66.  
  67. --
  68.                                               daveus rattus   
  69.  
  70.                                     yer friendly neighborhood ratman
  71.  
  72.                                 KOYAANISQATSI
  73.  
  74.     ko.yaa.nis.qatsi (from the Hopi Language)  n.  1. crazy life.  2. life
  75.         in turmoil.  3. life out of balance.  4. life disintegrating.  
  76.           5. a state of life that calls for another way of living.
  77.