[Math] How to limit the amount of curvature of a bezier curve

bezier-curve

I've been creating bezier curves in a program according to a user clicking where the endpoints ought to be with success. Now, I wonder if there is a way to restrict the shapes of the beziers such that their sharpness is minimized.

I know that a cubic bezier curve needs four pairs of coordinates: the start point, the endpoint, and two control points. My question then, is how do I calculate the best control points to minimize the amount of curvature in my bezier if the only requirements are the endpoints? And then how can I calculate that curvature so that I can altogether reject endpoints that produce too sharp of a curve? Assume I have a minimum radius that I want to honor.

I also know the tangents at the endpoints (at least one of them is known) so straight lines are ruled out.

Best Answer

If you would like to minimize the "sharpness" of the cubic Bezier curve honoring two end points and two end tangent directions, there is something called "optimized geometric Hermite curve" (OGH curve) that might be interested to you. The OGH curve does not minimize the maximum curvature of the curve. Instead, it minimizes the overall "strain energy" of the curve, which is

$$\int_0^1 [f^"(t)]^2 \;\mathrm{dt}$$

You can refer to this paper link for details. For cubic OGH curve, you can find out the "optimal" magnitudes of the end derivatives analytically. The formula is listed in this paper as equation (4).