Game Development for Xbox 360, PC + Windows Phone 7

Matrices - Knowing the correct Multiplicatio Order......

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

Top 10 Contributor
Male
21 Posts
garfbradaz posted on 20 Aug 2010 8:16 AM

Hi Chad,


Im only on Chapter 4,( the end of), so you might explain this better later on in the book, but on page 57, Transformation Reloaded you state that matrices are not communatative, which is fine, and that you you need to be careful of which order we perform those operations in.

 

Now i have reached the end of the Chapter, and iwhat i have gathered is the order should be:


1) Scale

2) Rotate

3) Translate (Move)


is that right? Do we always do it in that order then i presume?


Thanks again Chad.

Answered (Verified) Verified Answer

Top 10 Contributor
Male
135 Posts

An easy way to remember is ISROT

Identity (or Initialize) - Optional

Scale

Rotation

Orbit (Translate then Rotate)

Translate

So you would typically do it in the order you specified, but if you wanted an object to orbit around another object, then you would Rotate AFTER you translated the object.  For example, you draw the sun in the origin.  You then draw the earth and translate it to the correct position 93M miles away and then you rotate it which will make it orbit around the sun.  Of course you could rotate it before you translate it to make it spin on it's axis.

Hope this helps!

Chad

All Replies

Top 10 Contributor
Male
135 Posts

An easy way to remember is ISROT

Identity (or Initialize) - Optional

Scale

Rotation

Orbit (Translate then Rotate)

Translate

So you would typically do it in the order you specified, but if you wanted an object to orbit around another object, then you would Rotate AFTER you translated the object.  For example, you draw the sun in the origin.  You then draw the earth and translate it to the correct position 93M miles away and then you rotate it which will make it orbit around the sun.  Of course you could rotate it before you translate it to make it spin on it's axis.

Hope this helps!

Chad

Top 10 Contributor
Male
21 Posts

Again Chad, thank you, this helps greatly. Im in the middle of studing the following to help me grasp the Matrix Multiplication:

 

http://en.wikipedia.org/wiki/Matrix_multiplication

 

This is brow dripping stuff, but i feel is necessary to know before delving deeper into your book.

Page 1 of 1 (3 items) | RSS
© 2011 Chad Carter. All rights reserved.