lofidevops
lofidevops

Reputation: 16972

How to visualize 2- and 3-space matrix transformations in Python

I want to visualize matrix transformations in 2- and 3-space. I've tried finding an existing tool to do this to no avail [1] so now I'm looking for Python libraries so I can do it (almost) myself.

So I'd like to be able to enter a vector or matrix, see it in 2-space or 3-space, enter a transformation vector or matrix, and see the result. For example, enter a 3x3 matrix, see the parallelepiped it represents, enter a rotation matrix, see the rotated parallelepiped.

Bonus points for ability to calculate area/volume, animate, change colours, visualize higher dimensions, wash my socks.

I'm guessing I'm looking for two libraries, one for matrix math and one for drawing them in 2D and 3D.

(I'm also willing to look into scripts for existing FLOSS MATLAB clones, as long as said clone can be easily installed on Windows/Ubuntu.)

[1] See https://math.stackexchange.com/questions/34032/floss-tool-to-visualize-2-and-3-space-matrix-transformations and https://superuser.com/questions/275539/floss-tool-to-visualize-2-and-3-space-matrix-transformations if you know of one :)

Upvotes: 2

Views: 2795

Answers (2)

IgnacioEscorza
IgnacioEscorza

Reputation: 1

For reference, if you are looking to do something like plotTransforms in Matlab Example transformation matrix plot in Matlab You could use pytransform3d Example transformation matrix plot in Python

Upvotes: 0

ev-br
ev-br

Reputation: 26050

I don't know about mayavi, but with matplotlib you can definitely plot (almost) whatever you like. With the full power of python language you can define your vectors, matrices etc, multiply them any way you wish, and plot the results.

Upvotes: 2

Related Questions