Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!slxsys!ibmpcug!peterl From: peterl@ibmpcug.co.uk (Peter Leaback) Newsgroups: comp.graphics,connect.audit Subject: Errors in rotations Summary: A problem with errors in rotations Keywords: ROTATIONS Message-ID: <1990Jan2.163405.24094@ibmpcug.co.uk> Date: 2 Jan 90 16:34:05 GMT Organization: The IBM PC User Group, UK. Lines: 35 [this message has been re-posted because it did not reach some sites] 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. What I require is some method of keeping the errors from amplifying. I have been told there are methods of reconstructing rotation matrices. But I have also been told that reconstructing a rotation matrix is costly in processor time,so microcomputer flight simulators that use this method can only afford to reconstruct the rotation matrix every 500 or 1000 rotations. This method is undesirable because at the point where reconstruction of the matrix occurs, the object visibly jolts back into shape. What I would prefer (and some flight simulators use) is a method that after every rotation the matrix is nudged back into shape. I did think of using a method where the rotation is defined as x,y,z degrees from the axes. This would mean that any errors that occur would only affect the angles through which to rotate and NOT malform into any other geometrical transformation. The problem with this data structure is that combining two rotations defined as x,y,z degrees is very costly on processor power and requires 2 divisions. *ANY* comments on how to solve my problem would be greatly appreciated. Regards,Pete Leaback. -- Automatic Disclaimer: The views expressed above are those of the author alone and may not represent the views of the IBM PC User Group.