i'm looking for a 3d math library in python or with python bindings.
it needs to handle rotation, translation, perspective projection, everything basically.
what im NOT looking for is a library aimed at drawing on the screen, googling for hours only led to 3d libraries bent on rendering something to the screen. i dont want any visualization whatsoever, all i need is to be able feed a library x,y,z coordinates and recieve the x,y screen coordinates.
i dont mind if its a visualization library, as long as it can be used without rendering anything to the screen.
is there anything like this for python?
Edit: please dont recommend scipy/numpy as they arent aimed at 3d math but at math in general, they look like great tools if i wanted to build the library myself, which i dont. thanks.
The numpy library in Python is most widely used for carrying out mathematical operations that involve matrices.
Python has a built-in module that you can use for mathematical tasks. The math module has a set of methods and constants.
As I mentioned earlier, the math module comes packaged with the standard Python installation. So, it is a built-in Python module, and to use it you just need to import it. Printing the type() of math will tell you that it is a module. dir() will give you all available attributes and methods available in math .
The NumPy libraries handles the mathematical functions for arrays.
OpenCV - Python Interface can handle all the operations you've mentioned.
I hear SciPy's excellent for this as well, but I've only used OpenCV.
transformations.py
A library for calculating 4x4 matrices for translating, rotating, reflecting, scaling, shearing, projecting, orthogonalizing, and superimposing arrays of 3D homogeneous coordinates as well as for converting between rotation matrices, Euler angles, and quaternions. Also includes an Arcball control object and functions to decompose transformation matrices.
Authors: Christoph Gohlke http://www.lfd.uci.edu/~gohlke/ Laboratory for Fluorescence Dynamics, University of California, Irvine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With