[Bf-committers] Change Representation and Initialisation of Matrices to Conform with Standard Notation

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Dec 9 13:46:22 CET 2011


On Fri, Dec 9, 2011 at 11:01 AM, Ton Roosendaal <ton at blender.org> wrote:
> Can you provide evidence for who is spreading, supporting or enforcing
> this "Standard Notation"?
> Apart from that - especially when this standard appears disputable -
> we can much better ensure we are 100% clear about it in docs. Look at
> this wonderful Panda3d page:
> http://www.panda3d.org/manual/index.php/Matrix_Representation
> I rather see this approach for us!

I think the panda3d page is confusing the issue, yes you can interpret
things in many ways, but there's only confusion because IrisGL got it
wrong initially and didn't want to break compatibility, see footnote

There is a standard notation for writing down math formulas for
math/physics/graphics, and that is to use column vectors for spatial
points/vectors, and matrix elements as Aij, where i is the row and j
is the column.

Just to make the convention in Blender clear:
* Math functions in C and python assume column vectors for spatial
  (since we use mul_v3_m4v3, not mul_v3_v3m4)
* Matrix indexing uses A[j][i], with i the row and j column, so column major.



More information about the Bf-committers mailing list