Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!netcom!rodent From: rodent@netcom.UUCP (Ben Discoe) Newsgroups: comp.graphics Subject: how do i rotate around an arbitrary vector in 3D? Message-ID: <18733@netcom.UUCP> Date: 14 Dec 90 00:44:23 GMT Distribution: usa Organization: Netcom- The Bay Area's Public Access Unix System {408 241-9760 guest} Lines: 24 i need to rotate a large set of points around an arbitrary axis, specified as a vector. i know how to rotate around any base axis (since it's just 2D rotation). If i had Mathematica around, i'd just multiply the five rotation matrices involved, but i left that behind when i left academia. i figure you take the vector, find it's spherical coordinates theta phi, then: rotate -theta around z rotate -phi around y (original vector now lies along z^) rotate desired amount around z (then reverse the first two steps) rotate phi around y rotate theta around z If these transformations simplify into a nice simple matrix, great! The above assumes right-handed coords. If someone knows the final matrix, please specify which handedness you used. In case anyone is interested, it's for a cartographic application. Thanks! --------- Ben Discoe, frustrated visionary at large.