Skip to main content

Module sdf

Module sdf 

Source
Expand description

Analytical signed distance fields (SDF) and winding numbers for quadratic Béziers.

Functions§

distance_to_quadratic
Computes the exact minimum Euclidean distance from query point p to quadratic Bézier curve.
is_point_inside_closed_path
Evaluates whether point p is inside a closed path composed of quadratic Béziers using standard NonZero winding number.
is_point_inside_closed_path_rule
Evaluates whether point p is inside a closed path composed of quadratic Béziers according to the specified fill rule (NonZero or EvenOdd).
solve_cubic_roots
Solves real roots of cubic equation: a * t^3 + b * t^2 + c * t + d = 0.