newton.geometry.sdf_plane#

newton.geometry.sdf_plane(point, width, length)[source]#

Compute signed distance to a finite quad in the XY plane.

Parameters:
  • [m] (length) – Query point in the mesh local frame, shape [3], float.

  • [m] – Half-extent along X.

  • [m] – Half-extent along Y.

Returns:

Distance [m]. For finite extents (width > 0 and length > 0), this is a Chebyshev (L∞) distance approximation to the quad sheet (not exact Euclidean distance). The exact Euclidean distance would be sqrt(max(|x|-width, 0)^2 + max(|y|-length, 0)^2 + z^2). Otherwise, for width <= 0 or length <= 0, it reduces to the signed distance of the infinite plane (point.z).