Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Vectors and Matrices Mini Tutorial Date: Fri, 10 Jul 1998 10:50:25 +0100 Organization: Sony Computer Entertainment Europe Lines: 41 Message-ID: <35A5E3E1.488F60AF@scee.sony.co.uk> References: <35A25BBF.F272A126@scee.sony.co.uk> <35A5DCF1.10D9E988@immd9.informatik.uni-erlangen.de> NNTP-Posting-Host: camfw01.millennium.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Christoph Luerig wrote: > > Does the Playatstion also internally use this 3x3 Matrix plus translation vector representation, > or if this is just an external representation and 4x4 matrices are used internally? It's sort of a hybrid actually - You could say that it arbitrary 4x4 matrices, but forces the 4th column to be 0,0,0,1, and when you multiply by a 4 vector it forces the last term to be 1. My tutorial contains an example of what the GTE is actually doing with all those numbers. (It also shows how the GTE performs the perspective transform). The perspective transform is like multiplying the LS matrix by the following matrix: V = local vector (4 vector, last value is 1) LS = Local to Screen matrix (4x4, last column is 0,0,0,1) H = is projection distance The GTE does this: W = V * LS; (W is a 4 vector, now in screen space) U = W * (W.vz^-1 * [ H 0 0 0 ] ) [ 0 H 0 0 ] [ 0 0 H 0 ] [ 0 0 0 W.vz ] W.vz^-1 = 1/W.vz U now contains the screen X, screen Y, and some other stuff I won't go into because you don't need to worry about it. Because it doesn't use true 4x4 matrices (rather, it uses 3x3 and then translates the result), there are some unusual operations you can't perform that you'd normally use a 4x4 matrix for. But for rotation, scaling and translation, this is fine. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Famous Last Words: "OK, I lit the emergency candle. Why is it red?"