autopdex.geometry.psdf_parallelogram
- autopdex.geometry.psdf_parallelogram(x, x_p1, x_p2, x_p3)[source]
Positive normalized smooth distance function to a parallelogram, positive in the interior.
Usage for rectangle with vertices [[0,0],[0,1],[1,1],[1,0]]: psdf_parallelogram(x, [0,0], [0,1], [1,0])
- Parameters:
x (jnp.ndarray) – The point where the distance is evaluated.
x_p1 (jnp.ndarray) – First vertex of the parallelogram.
x_p2 (jnp.ndarray) – Second vertex of the parallelogram.
x_p3 (jnp.ndarray) – Third vertex of the parallelogram.
- Returns:
The positive distance from the point x to the region outside of the parallelogram.
- Return type:
float