Path: chuka.playstation.co.uk!news From: "Alex Herbert" Newsgroups: scee.yaroze.freetalk.english Subject: Re: repairing a matrix Date: Tue, 9 Jan 2001 17:19:35 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 76 Message-ID: <93fh5a$lv91@www.netyaroze-europe.com> References: <93ab2b$nvo1@www.netyaroze-europe.com> <93d7va$5a52@www.netyaroze-europe.com> NNTP-Posting-Host: host213-123-128-3.btopenworld.com X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Oops, I think I made a bit of a mistake there. I think I should have said divide by the square root. Alex Alex Herbert wrote in message news:93d7va$5a52@www.netyaroze-europe.com... > Hello, > > Ah, you want to Normalise (normalize - whatever) the matrix. > > 1. Take 1 row (or column - and it really doesn't matter which) of the 3x3 > rotation matrix at a time. > 2. Square each element in that row (or column) and add them together. > (With an unscaled/undistorted matrix, this should always equal 1. Well, to > be more accurate, the square root of 1 - it's the scaling factor for that > axis, squared.) > 3. Divide each of the three elements by the above result. > > Do this for each row (or column), and you should be sorted. Oh, don't > forget the fixed-point maths involved. (>>12 after multiplying, <<12 before > dividing - if that makes sense.) > > Hope this helps, > > Alex > > > ----- Original Message ----- > From: Jon Prestidge (Moose) > Newsgroups: scee.yaroze.freetalk.english > Sent: 07 January 2001 18:05 > Subject: repairing a matrix > > > > Hello, > > > > I understand that to get an object's matrix back to have perfectly > > perpendictular axis and proper scale (after it has gradually been > corrupted > > by many rotations) you can some how use a cross product or a dot product > > method, but I don't know any more than that. And I can't immediately > > work-out how it's done. Can anyone explain it further (which elements of > > the matrix you do what to etc), or perhaps give me a code snippet? > > > > Cheers, > > Jon Prestidge. > > > > > > Jon Prestidge (Moose) wrote in message > news:93ab2b$nvo1@www.netyaroze-europe.com... > > Hello, > > > > I understand that to get an object's matrix back to have perfectly > > perpendictular axis and proper scale (after it has gradually been > corrupted > > by many rotations) you can some how use a cross product or a dot product > > method, but I don't know any more than that. And I can't immediately > > work-out how it's done. Can anyone explain it further (which elements of > > the matrix you do what to etc), or perhaps give me a code snippet? > > > > Cheers, > > Jon Prestidge. > > > > > >