# Bezier Curve Problem, finding missing control point

Given the two sets of control points:

A: $(1, 2)$, $(2, 3)$, $(a, b)$, $(4, 2)$.

B: $(4, 2)$, $(c, d)$, $(5, 5)$, $(6, 4)$.

Find values for the control points $(a, b)$ and $(c, d)$ so that the resulting composite Bezier curve is smooth at the control point $(4, 2)$. How do I even go about starting this?

• First step: define what you mean by "smooth". – bubba Apr 15 '16 at 12:37

For the composite curve to be smooth at $(4\mid 2)\,$, the three control points $(a\mid b)\,$, $(4\mid 2)\,$, $(c\mid d)\,$ must be collinear --
i.e., $\begin{vmatrix} a&b&1\\ 4&2&1\\ c&d&1 \end{vmatrix}=0\,$.

@Senex Ægypti Parvi It depends of which smoothness we are speaking.

If it is a parametrization smoothness, i.e. not only the direction of the tangent but also the intensity of the speed vector should be identical, we must have a stronger constraint (2 conditions instead of 1):

$(4,2)$ should be the midpoint of $(a,b)$ and $(c,d)$, i.e., $\dfrac{a+c}{2}=4$ and $\dfrac{b+d}{2}=2$.

• \ You are quite right, and you may be assured that if Hannah had specified more than plain, vanilla smoothness, I would have endeavoured to please. Thank you for your input. – Senex Ægypti Parvi Apr 15 '16 at 0:58
• It doesn't make sense to talk about continuity of first derivative, because the OP doesn't tell us the parameter intervals used to define the two curves. If first derivatives agree in direction, you can always change the parameter intervals to make them agree in magnitude, too. In short, any $G1$ composite curve can be made $C1$, so the two concepts are essentially equivalent. – bubba Apr 15 '16 at 12:33
• @ bubba You are right. This distinction between geometric and parametric continuity does not exist "in theory". But in practise (I have assumed it is in this framework that the OP woks) it is much better to keep the natural parameterization : exact arc length parametrization, in particular, is almost never used by people working in this area, because it is too complicated). – Jean Marie Apr 15 '16 at 17:04
• @JeanMarie. What you wrote is correct only if both cubic segments have the same parameter range. Is that what you mean by "natural" parameterization? I'm not suggesting arclength parameterization -- I know that exists only in textbooks. – bubba Apr 16 '16 at 14:31
• @bubba Yes, the same parametric range, [0,1]. I agree, you didn't mention arc length, and now I understood: it suffices to reparameterize (only) the second Bezier curve by a linear change of variable ($t \rightarrow vt$) to adjust the initial speed in the second arc to the final speed of the first one. Is that what you had in mind ? – Jean Marie Apr 16 '16 at 14:39

Denoting the two set of control points as $A_i$ and $B_i$ ($i=0$~$3$), we can compute the 2nd derivatives at $t=1$ of curve A and at $t=0$ for curve B as

$A^"(1)=6(A_1-2A_2+A_3)$
$B^"(0)=6(B_0-2B_1+B_2)$

We also assume that the continuity at point $(4,2)$ is $C^2$ as $C^1$ continuity cannot result in an unique solution for $(a,b)$ and $(c,d)$. Then, we have $A^"(1)=B^"(0)$, from which we get

$\begin{cases}6-2a=4-2c \\ 5-2b=7-2d \end{cases}$

We also have $C^1$ continuity at point $(4,2)$, which will lead to

$\begin{cases}a+c=8\\ b+d=4 \end{cases}$

So, in the end we can solve for $(a,b)=(3.25, 1.5)$ and $(c,d)=(4.75,2.5)$.