phQuintics

fun List<Vector2>.phQuintics(closed: Boolean, offset: Double = 0.0, tolerance: Double = 0.01, polarity: YPolarity = YPolarity.CW_NEGATIVE_Y): ShapeContour(source)

Converts this polyline into a C2 spline of Pythagorean-hodograph quintics through all points, see phQuinticSpline, as a contour of cubic Béziers within tolerance. With a non-zero offset the offset curve at that distance is returned; it is evaluated exactly, PH curves have rational offsets, and approximated within tolerance too.

Parameters

closed

whether the polyline is closed, the last point should then not repeat the first

offset

the signed distance of the returned offset curve along the normal (-y, x), 0.0 for the spline itself

tolerance

the largest distance between the cubic approximation and the exact curve

polarity

the polarity of the resulting contour