stemflow.utils.sphere.discriminant_formula
intersect_triangle_plane(P0, V, A, B, C)
Get if the ray go through the triangle of A,B,C
Parameters:
-
P0
(ndarray
) –start point of ray
-
V
(ndarray
) –A point that the ray go through
-
A
(ndarray
) –point A of triangle. Shape (dimension).
-
B
(ndarray
) –point A of triangle. Shape (dimension).
-
C
(ndarray
) –point A of triangle. Shape (dimension).
Returns:
-
ndarray
–np.ndarray: Whether the point go through triangle ABC
Source code in stemflow/utils/sphere/discriminant_formula.py
is_point_inside_triangle(point, A, B, C)
Check if a point is inside a triangle
Parameters:
-
point
(ndarray
) –point in vector. Shape (X, dimension).
-
A
(ndarray
) –point A of triangle. Shape (dimension).
-
B
(ndarray
) –point B of triangle. Shape (dimension).
-
C
(ndarray
) –point C of triangle. Shape (dimension).
Returns:
-
ndarray
–np.ndarray: inside or not