Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!wrf From: wrf@mab.ecse.rpi.edu (Wm Randolph Franklin) Newsgroups: comp.graphics,connect.audit Subject: Re: Errors in rotations Keywords: ROTATIONS Message-ID: <~1HMQ$@rpi.edu> Date: 3 Jan 90 19:05:06 GMT References: <1990Jan2.163405.24094@ibmpcug.co.uk> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 31 In article <1990Jan2.163405.24094@ibmpcug.co.uk> peterl@ibmpcug.co.uk (Peter Leaback) writes: > >At the moment,I define my rotations as a 3x3 matrix containing 16 bit >fixed point numbers from 1 to -1. The problem I face is that after a few >thousand rotations,the errors that occur in combining rotations has >malformed the matrix. In fact, the matrix then becomes a scaling matrix >and reduces the size of the rotated object. One of the graphics texts (either F&vD or N&S) mentions in 2D perturbing the matrix so that its determinant is exactly 1 before applying it. At this point it's not exactly a rotation matrix but apparently that's less important than a non one det, since that is a scaling. My idea would be to have a sequence of rotation matrices for bigger and bigger angles, that is a matrix for t, 5t, 9t, etc. Then after compounding the t matrix 4 times, apply the 5t matrix to the original data, then apply the t matrix to that result several times, etc. This shouldn't be too expensive and if done right, there would be no visible jumps. Another method would be to rotate in a different coordinate system, such as one with the axis of rotation the Z axis. Here the errors would accumulate more slowly. After compounding the rotations transform to the desired coordinate system. This means you would apply two matrices for each rotation. -- Wm. Randolph Franklin Internet: wrf@ecse.rpi.edu (or @cs.rpi.edu) Bitnet: Wrfrankl@Rpitsmts Telephone: (518) 276-6077; Telex: 6716050 RPI TROU; Fax: (518) 276-6261 Paper: ECSE Dept., 6026 JEC, Rensselaer Polytechnic Inst, Troy NY, 12180