Creating Bézier curves with a maximum curvature

I am creating $5$-point Bézier curves. Sometimes, these curves are too sharp, see for example the below curve: there is a sharp cusp on the left. Is there any way that I can generate Bézier (or similar curves), but with the constraint that the curvature $\kappa$ is always under some value?

enter image description here

In essence, I would like to "smoothen" the curve to satisfy this constraint.


Solution 1:

Let’s assume you’re working with curves of degree 4.

Then the second derivative function of your curve is again a Bézier curve, say $C$, and it has degree two. If the curve $C$ doesn’t stray too far away from the origin, then that means your original curve has a fairly small second derivative, and (usually) this implies a large radius of curvature.

This isn’t rigorous because curvature and second derivative are two different things, but for “reasonable” curves, they are somewhat related.

To check how far $C$ travels away from the origin, you can do a simple check using it’s control polygon.

One way to ensure small second derivatives is to construct curves where the “legs” of the control polygon are of roughly equally length, and the turning angles between them are small (say, less than about 60 degrees). The cusp in your curve is because there’s a turn of around 160 degrees between the first and second legs of the control polygon.

You might benefit from reading this question, and from studying hodographs.