I have a problem. Suppose we have a single cubic bezier curve defined by four control points. Now suppose, the curve is cut from a point and each segment is again represented using cubic bezier curves. So, now if we are given two such beziers B1 and B2, is there a way to know if they can be joined to form another bezier curve B? This is to simplify the geometry by joining two curves and reduce the number of control points.
Share
Some thoughts about this problem.
I suggest there was initial Bezier curve
P0–P3with control pointsP1andP2Let’s make two subdivisions at parameters ta and tb.
We have now two subcurves (in yellow) –
P0–PA3andPB0–P3.Blue interval is lost.
PA1andPB2– known control points. We have to find unknownP1andP2.Some equations
Initial curve:
Endpoints:
Control points of small curves
Now substitute unknown points in PA3 equation:
(some multiplication signs have been lost due to SO formatting)
This is vector equation, it contains two scalar equations for two unknowns
taandtbThis system might be solved both numerically and analytically (indeed Maple solves it with very-very big cubic formula 🙁 )
If we have points with some error, that makes sense to build overdetermined equation system for some points (
PA3,PB0,PA2,PB1) and solve it numerically to minimize deviations.