Expand description
Curve–curve intersection by per-axis fat line clipping — the design is
curve_curve.md next to this file; it reuses the clip of
contains/curve.md and the search schedule of contains/surface.md.
For curves A(s) = H_A / W_A and B(t) = H_B / W_B with positive
weights, A_k(s) = B_k(t) iff
g_k(s, t) = H_{A,k}(s) W_B(t) - W_A(s) H_{B,k}(t) = 0, a polynomial
tensor-product spline in the independent parameters s, t with
coefficients d_ij = P_{i,k} Q_{j,w} - P_{i,w} Q_{j,k} — no division, no
degree elevation. Its zeros are clipped in both directions
([clip_tensor]), exactly as a surface’s are in contains::surface.
Assumes no coincident arcs (curve_curve.md): the result is a list of
paired (s, t) boxes, and reaching some count of them means nothing.
Functions§
- curve_
curve_ crossings - All
(s, t)withcurve_a(s) = curve_b(t), as paired parameter boxes (curve_curve.md), for curves that do not overlap along an arc — seecurve_curve_intersectfor the wrapper that handles overlaps. Breadth-first over pairs of subcurves: - curve_
curve_ intersect - Points where
curve_acrosses — or, overlapping along an arc, coincides with —curve_b: the drop-in counterpart ofsuper::curve_curve_bisect::curve_curve_intersect, with the same signature andIntersectionscontract. - refine_
crossing - Polish one isolated
(t_a, t_b)— as returned bycurve_curve_intersect— by Gauss-Newton onA(t_a) - B(t_b) = 0.