pyacs.lib.euclid module
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.
Vector2
(x=0, y=0)[source]
Bases: object
-
x
-
y
-
copy
()
-
magnitude
()
-
magnitude_squared
()[source]
-
normalize
()[source]
-
normalized
()[source]
-
dot
(other)[source]
-
cross
()[source]
-
reflect
(normal)[source]
-
angle
(other)[source]
Return the angle to the vector other
-
project
(other)[source]
Return one vector projected on the vector other
-
class
pyacs.lib.euclid.
Vector3
(x=0, y=0, z=0)[source]
Bases: object
-
x
-
y
-
z
-
copy
()
-
magnitude
()
-
magnitude_squared
()[source]
-
normalize
()[source]
-
normalized
()[source]
-
dot
(other)[source]
-
cross
(other)[source]
-
reflect
(normal)[source]
-
rotate_around
(axis, theta)[source]
Return the vector rotated around axis through angle theta. Right hand rule applies
-
angle
(other)[source]
Return the angle to the vector other
-
project
(other)[source]
Return one vector projected on the vector other
-
class
pyacs.lib.euclid.
Matrix3
[source]
Bases: object
-
copy
()
-
identity
()[source]
-
scale
(x, y)[source]
-
translate
(x, y)[source]
-
rotate
(angle)[source]
-
classmethod
new_identity
()[source]
-
classmethod
new_scale
(x, y)[source]
-
classmethod
new_translate
(x, y)[source]
-
classmethod
new_rotate
(angle)[source]
-
determinant
()[source]
-
inverse
()[source]
-
a
-
b
-
c
-
e
-
f
-
g
-
i
-
j
-
k
-
class
pyacs.lib.euclid.
Matrix4
[source]
Bases: object
-
copy
()
-
transform
(other)[source]
-
identity
()[source]
-
scale
(x, y, z)[source]
-
translate
(x, y, z)[source]
-
rotatex
(angle)[source]
-
rotatey
(angle)[source]
-
rotatez
(angle)[source]
-
rotate_axis
(angle, axis)[source]
-
rotate_euler
(heading, attitude, bank)[source]
-
rotate_triple_axis
(x, y, z)[source]
-
transpose
()[source]
-
transposed
()[source]
-
classmethod
new
(*values)[source]
-
classmethod
new_identity
()[source]
-
classmethod
new_scale
(x, y, z)[source]
-
classmethod
new_translate
(x, y, z)[source]
-
classmethod
new_rotatex
(angle)[source]
-
classmethod
new_rotatey
(angle)[source]
-
classmethod
new_rotatez
(angle)[source]
-
classmethod
new_rotate_axis
(angle, axis)[source]
-
classmethod
new_rotate_euler
(heading, attitude, bank)[source]
-
classmethod
new_rotate_triple_axis
(x, y, z)[source]
-
classmethod
new_look_at
(eye, at, up)[source]
-
classmethod
new_perspective
(fov_y, aspect, near, far)[source]
-
determinant
()[source]
-
inverse
()[source]
-
get_quaternion
()[source]
Returns a quaternion representing the rotation part of the matrix.
Taken from:
http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55
-
a
-
b
-
c
-
d
-
e
-
f
-
g
-
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
-
w
-
x
-
y
-
z
-
copy
()
-
magnitude
()
-
magnitude_squared
()[source]
-
identity
()[source]
-
rotate_axis
(angle, axis)[source]
-
rotate_euler
(heading, attitude, bank)[source]
-
rotate_matrix
(m)[source]
-
conjugated
()[source]
-
normalize
()[source]
-
normalized
()[source]
-
get_angle_axis
()[source]
-
get_euler
()[source]
-
get_matrix
()[source]
-
classmethod
new_identity
()[source]
-
classmethod
new_rotate_axis
(angle, axis)[source]
-
classmethod
new_rotate_euler
(heading, attitude, bank)[source]
-
classmethod
new_rotate_matrix
(m)[source]
-
classmethod
new_interpolate
(q1, q2, t)[source]
-
class
pyacs.lib.euclid.
Geometry
[source]
Bases: object
-
intersect
(other)[source]
-
connect
(other)[source]
-
distance
(other)[source]
-
class
pyacs.lib.euclid.
Point2
(x=0, y=0)[source]
Bases: pyacs.lib.euclid.Vector2
, pyacs.lib.euclid.Geometry
-
intersect
(other)[source]
-
connect
(other)[source]
-
x
-
y
-
class
pyacs.lib.euclid.
Line2
(*args)[source]
Bases: pyacs.lib.euclid.Geometry
-
p
-
v
-
copy
()
-
property
p1
-
property
p2
-
intersect
(other)[source]
-
connect
(other)[source]
-
class
pyacs.lib.euclid.
Ray2
(*args)[source]
Bases: pyacs.lib.euclid.Line2
-
p
-
v
-
class
pyacs.lib.euclid.
LineSegment2
(*args)[source]
Bases: pyacs.lib.euclid.Line2
-
magnitude_squared
()[source]
-
property
length
-
p
-
v
-
class
pyacs.lib.euclid.
Circle
(center, radius)[source]
Bases: pyacs.lib.euclid.Geometry
-
c
-
r
-
copy
()
-
intersect
(other)[source]
-
connect
(other)[source]
-
tangent_points
(p)[source]
-
class
pyacs.lib.euclid.
Point3
(x=0, y=0, z=0)[source]
Bases: pyacs.lib.euclid.Vector3
, pyacs.lib.euclid.Geometry
-
intersect
(other)[source]
-
connect
(other)[source]
-
x
-
y
-
z
-
class
pyacs.lib.euclid.
Line3
(*args)[source]
Bases: object
-
p
-
v
-
copy
()
-
property
p1
-
property
p2
-
intersect
(other)[source]
-
connect
(other)[source]
-
class
pyacs.lib.euclid.
Ray3
(*args)[source]
Bases: pyacs.lib.euclid.Line3
-
p
-
v
-
class
pyacs.lib.euclid.
LineSegment3
(*args)[source]
Bases: pyacs.lib.euclid.Line3
-
magnitude_squared
()[source]
-
property
length
-
p
-
v
-
class
pyacs.lib.euclid.
Sphere
(center, radius)[source]
Bases: object
-
c
-
r
-
copy
()
-
intersect
(other)[source]
-
connect
(other)[source]
-
class
pyacs.lib.euclid.
Plane
(*args)[source]
Bases: object
-
n
-
k
-
copy
()
-
intersect
(other)[source]
-
connect
(other)[source]