Home » Community » Forums » » 3D Matrix Math Demystified
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 3D Matrix Math Demystified
Post Reply 
This helped me figure something out tonight. When I was done reading it... I realized who wrote it.

Thanks Seumas

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

isn't the final block of code wrong? the code for multiplying 2 matrixes?


here's the code from the article:

for(i = 0; i < 3; i++){  //Cycle through each vector of first matrix.
  NewMatrix[i][0] = MatrixA[i][0] * MatrixB[0][0] +
    MatrixA[i][1] * MatrixB[1][0] + MatrixA[i][2] * MatrixB[2][0];
  NewMatrix[i][1] = MatrixA[i][0] * MatrixB[0][1] +
    MatrixA[i][1] * MatrixB[1][1] + MatrixA[i][2] * MatrixB[2][1];
  NewMatrix[i][2] = MatrixA[i][0] * MatrixB[0][2] +
    MatrixA[i][1] * MatrixB[1][2] + MatrixA[i][2] * MatrixB[2][2];
}


here's how I think it should look: (correct me if I'm wrong)

for(i = 0; i < 3; i++){  //Cycle through each vector of first matrix.
  NewMatrix[0][i] = MatrixA[0][i] * MatrixB[0][0] +
                    MatrixA[1][i] * MatrixB[0][1] + 
                    MatrixA[2][i] * MatrixB[0][2];
  NewMatrix[1][i] = MatrixA[0][i] * MatrixB[1][0] +
                    MatrixA[1][i] * MatrixB[1][1] +
                    MatrixA[2][i] * MatrixB[1][2];
  NewMatrix[2][i] = MatrixA[0][i] * MatrixB[2][0] +
                    MatrixA[1][i] * MatrixB[2][1] + 
                    MatrixA[2][i] * MatrixB[2][2];
}


Otherwise the article is very interesting.


 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Very nice, was really helpfull to me. I especially enjoied the non-mathematical, simple but clear way of explaining things. I think 3D graphics really needs more guides like this one.

 User Rating: 1015    Report this Post to a Moderator | Link

I had a firm grasp of matrix and vector math before this, but this is definitely the best written approach to matrices I've seen, text book or otherwise. And believe me, I have a LOT of books on the subject. Well done! I will definitely book mark this and recommend it to others.

 User Rating: 1036   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: