home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / graphics / 9463 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  992 b 

  1. Path: sparky!uunet!wupost!micro-heart-of-gold.mit.edu!rutgers!psinntp!psinntp!rd821!a036450
  2. From: a036450@rd821.UUCP (Bob Goldrich)
  3. Newsgroups: comp.graphics
  4. Subject: Re: 3d rotation about an arbitrary axis: how?
  5. Message-ID: <136@rd821.UUCP>
  6. Date: 3 Sep 92 12:32:24 GMT
  7. References: <87331@netnews.upenn.edu>
  8. Organization: The Gleason Works, Rochester New York
  9. Lines: 17
  10. X-Newsreader: Tin 1.1 PL4
  11.  
  12. ledogar@eniac.seas.upenn.edu (Charles Ledogar) writes:
  13. :.... but I don't know the rotation matrix
  14. : for rotation about that non-basic axis.  I'd rather not have to convert
  15. : to eye-coordinate space.
  16.  
  17. Here's a nice little vector formula which also works:
  18.  
  19. r1 = (r*u)u + sin(theta)(u%r) + cos(theta)u%(r%u)
  20.  
  21. Where:  r  = vector to be rotated
  22.         u  = vector to be rotated about (right hand rule)
  23.     theta  = amount of rotation
  24.        r1  = resulting rotated vector
  25.         *  = vector dot product
  26.         %  = vector cross product
  27.  
  28.                  -Bob Goldrich    a036450@rd821.gleason.com
  29.