Constant D_PENALTY_ELBOW

Source
const D_PENALTY_ELBOW: f64 = 0.65;
Expand description

As described in Simplifying Bézier paths, strictly optimizing for Fréchet distance can create bumps. The problem is curves with long control arms (distance from the control point to the corresponding endpoint). We mitigate that by applying a penalty as a multiplier to the measured error (approximate Fréchet distance). This is ReLU-like, with a value of 1.0 below the elbow, and a given slope above it. The values here have been determined empirically to give good results.