1
$\begingroup$

Suppose that we have a Bezier curve of order n represented in the matrix notation as $P(t) = T(t) \Lambda P_c$ (where P(t) is a point on the Bezier curve, $\Lambda$ is a lower triangular matrix containing Bernstein polynomial coefficients, $P_c$ is a set of Bezier curve control ponts, and T(t) is a vector containing n+1 elements of $t^{i-1}, i=1,\dots,n+1$).

Suppose that we have an extra point $P_n$ outside of the curve. What I want to do is to connect a straight line between $P_n$ and the first control point on the Bezier curve to create a new Bezier curve that retains the old curve, and augment it with this extra line. One way I though of doing so is to sample a set of points $P^{\prime}$ along the curve, add $P_n$ to $P^{\prime}$ such that $P'' = \{P_n,P'\}$, and then basically recalculate the set of control points $P_c$ to fit the points in $P''$, but for a cruve that is higher in order by one. This method works reasonably but it is not computationally cheap.

My question is: is there a way to recalculate the set of control points $P_c$ such that the point $P_n$ is connected to the head of the Bezier curve, while retaining the old curve and doing so in a smooth manner (having $C^2$ continuity where the connection takes place)?

And a follow up question: there is a method to split two Bezier curves, is there something to do the opposite (stitch together two curves to create a new Bezier curve)?

Thanks in advance for your help.

$\endgroup$

1 Answer 1

1
$\begingroup$

No Bézier curve can contain a straight line unless it entirely is a straight line. So, what you’re trying to do is impossible.

You could construct a new Bézier curve that approximates the original curve plus the straight line.

Or you could make a spline curve with two segments, one representing the original Bézier curve and one representing the straight line.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .