distortedSegment

fun distortedSegment(curve: Segment2D, samples: Int = 40, errorTolerance: Double = 0.5, maxDepth: Int = 8, distort: (Vector2) -> Vector2): List<Segment2D>(source)

Same idea as before: sample the curve, distort each sample, fit tangent-continuous beziers to the result.