Thread: What is what in a 4*4 matrix

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    589

    What is what in a 4*4 matrix

    I am kinda new to this so please bare(sp) with me
    When I describe the orientation of something I am supposed to use a 4*4 array aka matrix..right? But what does each field represent in that matrix? This is kinda where I am now. Each row represent a vector and the lenght of that vector is always 1. But what does the last row represent. Links are highly appriciated. Is the first row always representing the "models" X values second row Y etc...?

    Code:
    dXX dYX dZX  Rotation aroundX (A)?
    dXY dYY dZY  Rotation aroundY (B)?
    dXZ dYZ dZZ  Rotation aroundZ (C)?
    ?   ?   ?    ?

    ~Barjor

  2. #2
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    In short the 4x4 matrix is used to combine transformation and translation matrices together. Otherwise you would have screwed up equations trying to combine transformations (such as a rotation or scale) with a translation.

    the first 3x3 portion is the transformation matrix
    the fourth column is the three dimensional translation (displacement vector) matrix. The fourth row is comprised of zeros except for the last element of the matrix which is 1 when dealing with a point and 0 when dealing with a vector

    assume x = transformation matrix
    t = translation matrix
    [x x x t]
    [x x x t]
    [x x x t]
    [0 0 0 w]
    w = 1 if operating on a point
    w = 0 if operating on a vector

    EDIT: this is pretty complex stuff just so you know. If you are just starting out I kinda doubt you're really going to need to know 100% of what I just told you. I haven't even delved into this extensively on my own, I just know what I'm talking about in 'vague' terms, I haven't actually used this into any programs.
    Last edited by Silvercord; 04-25-2003 at 12:55 PM.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    Thanks Silvercord. Your explenation was just what I needed to get the "ahaaaaa" experience. That fourth row always been confusing me. I am working with a 3D cad system so sooner then later I will have to get my hands dirty with this stuff.

  4. #4
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    I suppose you are right. Wow Cad 3d system? That sounds pretty cool. You should share it with us when you feel like releasing it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  3. Gauss-Jordan Matrix Inversion in C++
    By Max_Power82 in forum C++ Programming
    Replies: 3
    Last Post: 12-03-2006, 08:31 PM
  4. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM