SomeGuy

10-20-2003, 06:29 PM

Hi all!

I've got a problem.

Before I can tell you what the problem is, there's something you should know about me.

I'm a guy that doesn't take peace at using something ofwich I don't understand how it works.

I've being living with that lifestyle for quite some time.

However there's one thing I never fully understoud.

And those are matrices.

I know how to use them, and I know how to fiddle with them to make them do their magic, but there are some parts of simple matrix algorithms I don't fully understand the 'why it works' behind them.

The thing I'm having problems with, is this;

To apply a matrix M to a Vector XYZ you should do this;

M = |M11,M12,M13,M14|

|M21,M22,M23,M24|

|M31,M32,M33,M34|

|M41,M42,M43,M44|

newX = (X*M11)+(Y*M21)+(Z*M31)+M41

newY = (X*M12)+(Y*M22)+(Z*M32)+M42

newZ = (X*M13)+(Y*M23)+(Z*M33)+M43

My question is simple;

Why am I adding an X, Y and Z coordinate together (multiplied with a scalar in the matrix) to get, for example, my new X coordinate?

Where's the logic in that?

The last value added to to the equation, in thise case M41, M42 and M43 are the Translation to add to any vector to be transformed by the matrix. That's pretty simple to grasp; Add a number to the axis of a vector and it will be moved by that amount on that axis.

To explain the thing i'm having trouble understanding with in another way;

I know that if I want to translate my point on the X axis my moving it 5 units, that I do this;

newX = (X*1)+(Y*0)+(Z*0)+5

newY = (X*0)+(Y*1)+(Z*0)+0

newZ = (X*0)+(Y*0)+(Z*1)+0

My question could also be stated as:

"What happens when I multiply multiple axes by 1 to get a new axes?"

Hope you lived through my inane babbling to enrich my feeble deteriorating mind with your awnsers.

http://www.opengl.org/discussion_boards/ubb/tongue.gif

I've got a problem.

Before I can tell you what the problem is, there's something you should know about me.

I'm a guy that doesn't take peace at using something ofwich I don't understand how it works.

I've being living with that lifestyle for quite some time.

However there's one thing I never fully understoud.

And those are matrices.

I know how to use them, and I know how to fiddle with them to make them do their magic, but there are some parts of simple matrix algorithms I don't fully understand the 'why it works' behind them.

The thing I'm having problems with, is this;

To apply a matrix M to a Vector XYZ you should do this;

M = |M11,M12,M13,M14|

|M21,M22,M23,M24|

|M31,M32,M33,M34|

|M41,M42,M43,M44|

newX = (X*M11)+(Y*M21)+(Z*M31)+M41

newY = (X*M12)+(Y*M22)+(Z*M32)+M42

newZ = (X*M13)+(Y*M23)+(Z*M33)+M43

My question is simple;

Why am I adding an X, Y and Z coordinate together (multiplied with a scalar in the matrix) to get, for example, my new X coordinate?

Where's the logic in that?

The last value added to to the equation, in thise case M41, M42 and M43 are the Translation to add to any vector to be transformed by the matrix. That's pretty simple to grasp; Add a number to the axis of a vector and it will be moved by that amount on that axis.

To explain the thing i'm having trouble understanding with in another way;

I know that if I want to translate my point on the X axis my moving it 5 units, that I do this;

newX = (X*1)+(Y*0)+(Z*0)+5

newY = (X*0)+(Y*1)+(Z*0)+0

newZ = (X*0)+(Y*0)+(Z*1)+0

My question could also be stated as:

"What happens when I multiply multiple axes by 1 to get a new axes?"

Hope you lived through my inane babbling to enrich my feeble deteriorating mind with your awnsers.

http://www.opengl.org/discussion_boards/ubb/tongue.gif