Python linear algebra module -- requesting comments on interface
C. Barnes
connellybarnes at yahoo.com
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
mat3.toEulerXYZ())
>there are other libs with similar types and
functions:
>cgkit (http://cgkit.sourceforge.net/)
Thanks for the link! I had planned on changing around
the constructors: using Matrix.zero(),
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
library.
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:
http://math.nist.gov/javanumerics/jama/
ftp://math.nist.gov/pub/Jampack/Jampack/AboutJampack.html
- Connelly Barnes
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the Python-list
mailing list