pyacs.lib.euclid
euclid graphics maths module
Documentation and tests are included in the file “euclid.rst”, or online at https://github.com/ezag/pyeuclid/blob/master/euclid.rst
- class pyacs.lib.euclid.Line2(*args)[source]
Bases:
Geometry- copy()
- p
- property p1
- property p2
- v
- class pyacs.lib.euclid.Matrix4[source]
Bases:
object- a
- b
- c
- copy()
- d
- e
- f
- g
- get_quaternion()[source]
Return a quaternion representing the rotation part of the matrix.
Algorithm from: http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55
- Returns:
Quaternion representing the rotation part.
- Return type:
- h
- i
- j
- k
- l
- m
- n
- o
- p
- class pyacs.lib.euclid.Quaternion(w=1, x=0, y=0, z=0)[source]
Bases:
object- copy()
- magnitude()
- w
- x
- y
- z
- class pyacs.lib.euclid.Vector2(x=0, y=0)[source]
Bases:
object- angle(other)[source]
Return the angle to the vector other.
- Parameters:
other (Vector2) – The other vector.
- Returns:
Angle in radians.
- Return type:
float
- copy()
- magnitude()
- x
- y
- class pyacs.lib.euclid.Vector3(x=0, y=0, z=0)[source]
Bases:
object- angle(other)[source]
Return the angle to the vector other.
- Parameters:
other (Vector3) – The other vector.
- Returns:
Angle in radians.
- Return type:
float
- copy()
- magnitude()
- rotate_around(axis, theta)[source]
Return the vector rotated around axis through angle theta. Right hand rule applies.
- x
- y
- z