Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3d Math Library For Python [closed]

Tags:

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.

like image 285
spearfire Avatar asked Oct 12 '09 20:10

spearfire


People also ask

Which Python library is used for mathematics?

The numpy library in Python is most widely used for carrying out mathematical operations that involve matrices.

Is math library built-in Python?

Python has a built-in module that you can use for mathematical tasks. The math module has a set of methods and constants.

How do I install Python math module?

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 .

Which library provides advanced mathematical functions in Python?

The NumPy libraries handles the mathematical functions for arrays.


2 Answers

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.

like image 141
Jacob Avatar answered Oct 14 '22 21:10

Jacob


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

like image 32
evan Avatar answered Oct 14 '22 20:10

evan