autopdex.geometry.psdf_triangle_2d
- autopdex.geometry.psdf_triangle_2d(x, x_p1, x_p2, x_p3)[source]
Interior positive normalized smooth distance function of a triangle in 2D and a tri-prism in 3D.
- Parameters:
x (jnp.ndarray) – The point where the distance is evaluated.
x_p1 (jnp.ndarray) – First vertex of the triangle.
x_p2 (jnp.ndarray) – Second vertex of the triangle.
x_p3 (jnp.ndarray) – Third vertex of the triangle.
- Returns:
The positive distance from the point x to the region outside of the triangle or tri-prism.
- Return type:
float