[Tutor] matrix operations and 3d drawings

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Tue Apr 22 14:20:02 2003


On Tue, 22 Apr 2003, Denis Dzyubenko wrote:

> I have a matrix (3x3, for example) and a vector (i.e. 3x1 matrix), I
> want to multiply them, and the resulting vector I want to draw on
> screen.
>
> In other words, I need function to multiply two matrixes, function to
> get calculate determinant and rank of matrix, and function to draw 3d
> line. Is it possible to do this in python?

Hi Denis,

For the matrix stuff, see Numeric Python:

    http://www.pfdubois.com/numpy/

I'm positive that it has functions for doing Matrix calculations like
determinant and rank stuff.


For 3d stuff, you have a few choices, and you can find out about them from
the Vaults of Parnassus:

    http://www.vex.net/parnassus/
    http://py.vaults.ca/parnassus/apyllo.py/302299380


In particular, you may want to check out VPython:

    http://vpython.org/

I haven't had too much experience with VPython myself, but I've heard that
it's a very nice module for doing visualization and 3d stuff.


You can look at one concrete application of Numeric Python and VPython:
Arthur Siegel's 'PyGeo' project applies both modules to spectacular
effect:

    http://home.netcom.com/%7Eajs/index.html


I hope this helps!