Path: chuka.playstation.co.uk!news From: Jim Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Matrices Date: Fri, 13 Jun 1997 13:06:56 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 39 Message-ID: <33A137E0.99CE1D83@micronetics.com> References: <01bc7723$05437940$LocalHost@default> NNTP-Posting-Host: jim.micronetics.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.0b4 [en] (Win95; I) X-Priority: 3 (Normal) Jon Prestidge (alias Moose) wrote: > > All the books and source-codes I've looked at so far (except Yaroze stuff) > seem to use 4x4 matrices for 3D work, where as the only structure (ie > MATRIX) used in the Yaroze stuff is a 3x3 matrix. Why? For speed and a smaller structure with no loss of any real information. To multiply two 4x4 matrix you would require 64 multiplications whereas two 3x3 would only require 36. Both are worse cases. >However I've > noticed that in most examples in books where 4x4 matrices are used > (translating,scaling,rotating etc), the last row and column seem largley > redundant - is this anything to do with it?... or what? The last column is redundant(sortof). The last row is for translation. So when you multiply the last element of the last column (matrix[3][3] in a 4x4, and is always 1) with the last row the result is the same. So you may as well just add it to the resulting final matrix anyway. Thats why if you look at the MATRIX structure there is the t[3] portion. That's the translation. > > Also what's this Unit Matrix (GsIDMATIX) all about... is it just an ID > matrix as the name might suggests? Yep, it's the identity matrix. Just a neat way of initilizing it. >I can't find any significant mention > of it in the manual. Is the Unit Matrix mentioned in the Library > Reference Manual for the GsInitCoordinate2 routine (page 123 in my copy) > the same as GsIDMATRIX? Unsure but I would guess so. Jim