Python linear algebra module -- requesting comments on interface

C. Barnes connellybarnes at
Wed Sep 14 09:00:37 CEST 2005

Szabolcs Nagy wrote:
>nice interface, but with 3d apps i prefer cgkit's
approach, which has
>vec3, vec4, mat3, mat4 and quat types with lots of
useful functions for
>3d graphics (like mat4.looakAt(pos, target, up) or

>there are other libs with similar types and
>cgkit (

Thanks for the link!  I had planned on changing around
the constructors: using,
Matrix.identity(), and Matrix.random() static methods
(instead of module functions), and adding
Matrix.rotate(), Matrix.translate(), Matrix.scale()
for homogenous 4-matrices and with an optional arg
that would make a 3-matrix in special cases.  Then I
thought  I'd add affine_transform() and
homogeneous_transform() module methods, which could
transform several vectors at once if they are stored
in a matrix.

But I looked over cgkit's interface, and it is EXACTLY
what I wanted.  I guess my scientific programming
background made me think up too general of an
interface.  So I've cancelled this linear algebra

If anyone needs the matrix decompositions, and you
can't find them elsewhere, you can always make your
own library.  I was planning on using the public
domain code from:

 - Connelly Barnes

Yahoo! Mail - PC Magazine Editors' Choice 2005

More information about the Python-list mailing list