autopdex.geometry.psdf_polygon

autopdex.geometry.psdf_polygon(x, x_p_list)[source]

Positive normalized smooth distance function for a polygon in 2D.

Parameters:
  • x (jnp.ndarray) – The point where the distance is evaluated.

  • x_p_list (list of jnp.ndarray) – List of edge coordinates of the polygon.

Returns:

The positive distance from the point x to the polygon boundary. (Positive inside and outside)

Return type:

float