Package-level declarations

Functions

Link copied to clipboard
fun List<Vector2>.kCurve(closed: Boolean, polarity: YPolarity = YPolarity.CW_NEGATIVE_Y): ShapeContour

Converts this polyline into a κ-curve, after Yan, Schiller, Wilensky, Carr and Schaefer, "κ-Curves: Interpolation at Local Maximum Curvature" (SIGGRAPH 2017): a curve of quadratic Béziers, one per point, on which every point is where the curvature of its quadratic peaks. Corners of the polyline therefore become the sharpest spots of the curve, and the curve never bends more sharply between the points than at them.