Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 1.44 KB

README.md

File metadata and controls

42 lines (36 loc) · 1.44 KB

Pyclid

A simple mathematics module supporting Vectors, Matrices and Quaternions.

Current available vector classes are the Vec2, Vec3 and Vec4 classes. See the vectors page for details on class functionality.

>>> import pyclid
>>> pyclid.Vec2()
<0, 0>
>>> pyclid.Vec3()
<0, 0, 0>
>>> pyclid.Vec4()
<0, 0, 0, 0>

Current available matrix classes are the Mat2, Mat3 and Mat4 classes. The classes support standard matrix algebra as well advanced formula used for graphical calculations. Currently the Mat3 and Mat4 are subject to change, since there is still a design decision to be made over their compatibility with Vec3 and Vec4 classes for graphical use (i.e. Vec3 used with a Mat4 rotation matrix). Current functionality can be found on the matrices readme.

>>> pyclid.Mat2()
| 0 0 |
| 0 0 |
>>> pyclid.Mat3()
| 0 0 0 |
| 0 0 0 |
| 0 0 0 |
>>> pyclid.Mat4()
| 0 0 0 0 |
| 0 0 0 0 |
| 0 0 0 0 |
| 0 0 0 0 |

Limited support is currently available for quaternions. Currently there is a single Quaternion class (Quat), and contains four parameters (q0, q1, q2 and q3). Few functions have been added for the quaternion class and is very much a work in progress. Current functionality can be found on the quaternions readme.

>>> python.Quat()
<0, 0, 0, 0>