home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!micro-heart-of-gold.mit.edu!rutgers!psinntp!psinntp!rd821!a036450
- From: a036450@rd821.UUCP (Bob Goldrich)
- Newsgroups: comp.graphics
- Subject: Re: 3d rotation about an arbitrary axis: how?
- Message-ID: <136@rd821.UUCP>
- Date: 3 Sep 92 12:32:24 GMT
- References: <87331@netnews.upenn.edu>
- Organization: The Gleason Works, Rochester New York
- Lines: 17
- X-Newsreader: Tin 1.1 PL4
-
- ledogar@eniac.seas.upenn.edu (Charles Ledogar) writes:
- :.... but I don't know the rotation matrix
- : for rotation about that non-basic axis. I'd rather not have to convert
- : to eye-coordinate space.
-
- Here's a nice little vector formula which also works:
-
- r1 = (r*u)u + sin(theta)(u%r) + cos(theta)u%(r%u)
-
- Where: r = vector to be rotated
- u = vector to be rotated about (right hand rule)
- theta = amount of rotation
- r1 = resulting rotated vector
- * = vector dot product
- % = vector cross product
-
- -Bob Goldrich a036450@rd821.gleason.com
-