3
\$\begingroup\$

I've been reading a lot about computer graphics lately and because of it I'm building my own math library's for fun. I was reading about Matrix Translation and Homogeneous Coords, and was wondering if these two both translate the x factor by 3.

{ 1, 0, 0, 3 } = { 1, 0, 0, 0 }
{ 0, 1, 0, 0 } = { 0, 1, 0, 0 }
{ 0, 0, 1, 0 } = { 0, 0, 1, 0 }
{ 0, 0, 0, 1 } = { 3, 0, 0, 1 }

I guess what i'm really asking is if I wanted to preform a translation would both of these be exceptible or only the first?

\$\endgroup\$
2
  • \$\begingroup\$ First version = directX Second version = OpenGL \$\endgroup\$ Mar 5, 2013 at 1:08
  • \$\begingroup\$ Untrue. Both APIs support both versions. \$\endgroup\$ Mar 5, 2013 at 1:12

1 Answer 1

2
\$\begingroup\$

Both are valid and the difference is that your first is a column-major translation matrix whereas your second is row-major. The difference lies in the order you multiply matrices and in how you perform the final position transform. I'd encourage you to research more on the terms "column-major" and "row-major" for further info.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks, will do now that I have a word for it. Thanks again! :) \$\endgroup\$ Mar 5, 2013 at 1:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .