Path: chuka.playstation.co.uk!news From: SCEE Developer Support Newsgroups: scee.yaroze.programming.libraries Subject: Re: Rotation Matrix Functions : Still Date: Wed, 16 Apr 1997 13:57:56 +0100 Organization: Sony Computer Entertainment Europe Lines: 111 Message-ID: <3354CCD4.5A60@interactive.sony.com> References: <01bc4074$bd79ee80$d603e8c3@fred> <334A0C83.5959@micronetics.com> <3348D96D.289@interactive.sony.com> <334b2016.21064909@news.playstation.co.uk> <01bc4448$a37ddc80$0b16e8c3@fred> <334BA817.4A3C@interactive.sony.com> <01bc454b$1c8e8fe0$5214e8c3@fred> <334CA29A.539A@interactive.sony.com> <01bc45ea$2a00f1a0$c209e8c3@fred> <01bc46b0$08c8d860$ce08e8c3@fred> <3351F803.EB8@interactive.sony.com> <01bc4928$a4dd0940$f61ae8c3@fred> <33534048.2B79@interactive.sony.com> <01bc49fc$73633900$LocalHost@fred> NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Michael Enoch wrote: > > > To sort this I will need to see printouts of the matrix > > (that was the thing in your earlier posting that made it look > > like the normalisation wasn't working). > > > > > > Good luck > > > > Lewis > > Ok, I hope this is what you mean by printouts...... > > Here are 17 matrices. Each matrix is a printout of what happens to my > object's matrix when you rotate the object around the Y axis by (4096/16) > units each time. The function I used to get these results was the one I > posted earlier except with the changes you suggested in your last posting. > These results are different (worse) than the ones I posted before because > the normalisation code wasn't in the right place to work last time. > > 4096 0 0 > 0 4096 0 > 0 0 4096 > > 3784 0 1568 > 0 4096 0 > -800 0 3784 > > 2896 0 2897 > 0 4096 0 > -5184 0 3377 > > 1566 0 3784 > 0 4096 0 > -30282 0 751 > > 766 0 4096 > 0 4096 0 > 6971 0 9319 > > -17970 0 4008 > 0 4096 0 > 1011 0 3969 > > 32766 0 -29442 > 0 4096 0 > 183 0 4053 > > 3739 0 -13081 > 0 4096 0 > 9467 0 3851 > > 2547 0 -15012 > 0 4096 0 > 2914 0 2878 > > 2178 0 16616 > 0 4096 0 > 1590 0 3774 > > -6761 0 3955 > 0 4096 0 > 24 0 4096 > > 20320 0 557 > 0 4096 0 > -778 0 3793 > > 3739 0 1670 > 0 4096 0 > -6312 0 3391 > > 2815 0 2974 > 0 4096 0 > 5872 0 409 > > 1462 0 3826 > 0 4096 0 > 3666 0 1827 > > 654 0 4094 > 0 4096 0 > 2687 0 3091 > > -12848 0 3984 > 0 4096 0 > 1298 0 3884 > > Ok that's it :) > The second from last one should be when it finished a full loop, I think, > but it's certainly not the same as the first matrix. I hope this helps. > > Mike. It really looks like something wrong with the code to rotate the matrix; from the printouts above, you can see that the matrix is badly trashed by #4/#5 onwards. The problems with object shearing, due to matrix distortion due to lots of small inaccuracies compounding, do not usually even begin to surface after a handful of rotations. Again, Don't use the rsin and rcos to do the rotations; if you use the rotation method of eg flying or dungeon\tuto16, do the zyx rotations in that order per frame, for each one use RotMatrix to get rotation matrix for that component (eg the thetaZ part), then use MulMatrix0. That code definitely does object-relative rotation and movement in 3d, and the matrix doesn't need normalising for a long time. Lewis