aim2dat.utils.maths
¶
Module that contains custom mathematical functions.
Module Contents¶
Functions¶
|
Calculate the angle between two vectors. |
|
Calculate the circular segment. |
|
Calculate the plane from 3 given points in the form |
|
Calculate the area of a polygon. |
|
Calculate the 3d reflection matrix normal to the input vector. |
|
Calculate the solid angle between a center point and points that span a polyhedron. |
|
Create linearly independent vector with reference to the input vector. |
|
Calculate the Gaussian function with a certain sigma-value. |
- aim2dat.utils.maths.calc_circular_segment_area(radius, distance)[source]¶
Calculate the circular segment.
- aim2dat.utils.maths.calc_plane_equation(point1, point2, point3)[source]¶
Calculate the plane from 3 given points in the form
a*x + b*y + c*z = d
.- Parameters:¶
point1 (list or np.array) – Point in 3-dimensional space.
point2 (list or np.array) – Point in 3-dimensional space.
point3 (list or np.array) – Point in 3-dimensional space.
- Returns:¶
a (float) – plane parameter.
b (float) – plane parameter.
c (float) – plane parameter.
d (float) – plane parameter.
- aim2dat.utils.maths.calc_reflection_matrix(n_vector)[source]¶
Calculate the 3d reflection matrix normal to the input vector.
- aim2dat.utils.maths.calc_solid_angle(center, points)[source]¶
Calculate the solid angle between a center point and points that span a polyhedron.