Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Matrices: 3x3 or 4x4 Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Effin Goose

August 21, 1999, 09:17 PM

Hi,

I was just interested in what types of matrix sizes(if any) people use in transformations of 3d objects. I'm currently doing some 3d programming, and I'm not sure whether to use 3x3 for rotations and a translation vector, or go the whole hog with the homogenous coordinates thing and the 4x4 matrix.

Ryan

 
Jaap Suter

August 22, 1999, 04:50 AM

I remember a very long thread a while ago about 3x3 versus 4x4.

I think it is just a matter of taste. I see no real optimizations in a 3x3 matrix and I like everything generalized so I'm using 4x4. Besides DirectX and openGL use 4x4 so passing your matrices to those API's will be easier when you use 4x4 I guess.

Just my 2 cents...

Jaap

 
Tim

August 22, 1999, 11:42 AM

I use 4x4 with a catch. My routine that multiplies the 4x4 matrix by the 3 vector is asm code that only does the 3x3 rotation and the 3 translation. The nice thing about using a 4x4 matrix is that if you need to apply multiple layers of rotation and translation, then it can simply be done by multiplying the matrices together in the proper order.

Tim

 
Effin Goose

August 23, 1999, 09:56 AM

>>I think it is just a matter of taste. I see no real optimizations in a 3x3 matrix and I like everything generalized so I'm using 4x4.

Hi,
With your 4x4 matrix, do u pass it a 4 dimensional homogenous vector or a 3 dimensional one and just assume the w element is equal to one?

Ryan

 
Tim

August 23, 1999, 12:00 PM

I just use a 3d vector with w assumed to be 1. Michael Abrash's Graphic Programming black book has the ASM source for exactly this (it is what I use).

 
This thread contains 5 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.