mymesh.rays.PointInTet#

mymesh.rays.PointInTet(pt, Tet, eps=1e-12, inclusive=True)[source]#

Test to determine whether a point is inside a tetrahedron

Parameters:
  • Tri (np.ndarray) – Coordinates of the three vertices of the triangle in the format np.array([[x0, y0, z0], [x1, y1, z1], [x2, y2, z2], [x3, y3, z3]],dtype=float)

  • pt (np.ndarray) – Coordinates of the point to test

  • eps (float, optional) – Small tolerance parameter when points are on the face/edge of the tet, by default 1e-12

  • inclusive (bool, optional) – Specifies whether a point on the edge/face of the tet should be considered inside, by default True

Returns:

In – True if the point is inside the tetrahedron

Return type:

bool