Geometry3D.utils package¶
Submodules¶
Geometry3D.utils.constant module¶
Constant module
EPS and significant numbers for comparing float point numbers.
Two float numbers are deemed equal if they equal with each other within significant numbers.
Significant numbers = log(1 / eps) all the time
-
Geometry3D.utils.constant.
set_eps
(eps=1e-10)[source]¶ Input:
eps: floating number with 1e-10 the default
Output:
No output but set EPS to eps
Signigicant numbers is also changed.
Geometry3D.utils.logger module¶
Logger Module
Geometry3D.utils.solver module¶
Solver Module, An Auxilary Module
-
class
Geometry3D.utils.solver.
Solution
(s)[source]¶ Bases:
object
Holds a solution to a system of equations.
Geometry3D.utils.util module¶
Util Module
Geometry3D.utils.vector module¶
Vector Module
-
class
Geometry3D.utils.vector.
Vector
(*args)[source]¶ Bases:
object
Vector Class
-
cross
(other)[source]¶ Calculates the cross product of two vectors, defined as _ _ / x2y3 - x3y2 x × y = | x3y1 - x1y3 |
x1y2 - x2y1 /
The cross product is orthogonal to both vectors and its length is the area of the parallelogram given by x and y.
-
normalized
()[source]¶ Return the normalized version of the vector, that is a vector pointing in the same direction but with length 1.
-
unit
()¶ Return the normalized version of the vector, that is a vector pointing in the same direction but with length 1.
-
-
Geometry3D.utils.vector.
x_unit_vector
()¶ Returns the unit vector (1 | 0 | 0)
-
Geometry3D.utils.vector.
y_unit_vector
()¶ Returns the unit vector (0 | 1 | 0)
-
Geometry3D.utils.vector.
z_unit_vector
()¶ Returns the unit vector (0 | 0 | 1)
Module contents¶
-
class
Geometry3D.utils.
Vector
(*args)[source]¶ Bases:
object
Vector Class
-
cross
(other)[source]¶ Calculates the cross product of two vectors, defined as _ _ / x2y3 - x3y2 x × y = | x3y1 - x1y3 |
x1y2 - x2y1 /
The cross product is orthogonal to both vectors and its length is the area of the parallelogram given by x and y.
-
normalized
()[source]¶ Return the normalized version of the vector, that is a vector pointing in the same direction but with length 1.
-
unit
()¶ Return the normalized version of the vector, that is a vector pointing in the same direction but with length 1.
-
-
Geometry3D.utils.
x_unit_vector
()¶ Returns the unit vector (1 | 0 | 0)
-
Geometry3D.utils.
y_unit_vector
()¶ Returns the unit vector (0 | 1 | 0)
-
Geometry3D.utils.
z_unit_vector
()¶ Returns the unit vector (0 | 0 | 1)
-
Geometry3D.utils.
set_eps
(eps=1e-10)[source]¶ Input:
eps: floating number with 1e-10 the default
Output:
No output but set EPS to eps
Signigicant numbers is also changed.
-
Geometry3D.utils.
get_sig_figures
()[source]¶ Input:
no input
Output:
current significant numbers: int
-
Geometry3D.utils.
set_sig_figures
(sig_figures=10)[source]¶ Input:
sig_figures: int with 10 the default
Output:
No output but set signigicant numbers to sig_figures
EPS is also changed.