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\$
  • \$\begingroup\$ First version = directX Second version = OpenGL \$\endgroup\$ – Chris Condy Mar 5 '13 at 1:08
  • \$\begingroup\$ Untrue. Both APIs support both versions. \$\endgroup\$ – Maximus Minimus Mar 5 '13 at 1:12
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.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks, will do now that I have a word for it. Thanks again! :) \$\endgroup\$ – Haywire Spark Mar 5 '13 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.