Finding three-piece cubic Bezier curve with three points only I am having trouble in understanding and finding "the three-piece Bezier curve forming a triangle with vertices (1,2), (3,4) and (5,1)".
My understanding so far is that I need 4 points to form a cubic Bezier curve, but the textbooks excersice solution insists it is a third-degree (cubic) solution despite only having 3 points.
I have tried to use (1,2) as a fourth and last end-point and went on to solve for a Bezier curve with points (1,2), (3,4),(5,1), (1,2), but with no meaningful solution.
Off course I see that this will only be a dot in reality since I am basically puting the end-point at the same place as the starting-point, but I'm really clueless on what to do.
I am not sure I quite understand what a "three-piece" solution means, could that be a clue on how to solve?
The solution is stated as:
$\begin{cases}  x(t) = 1+6t^2-4t^3\\y(t) = 2+6t^2-4t^3 \end{cases}$
$\begin{cases}  x(t) = 3+6t^2-4t^3\\y(t) = 4-9t^2+6t^3 \end{cases}$
$\begin{cases}  x(t) = 5-12t^2+8t^3\\y(t) = 1+3t^2-2t^3 \end{cases}$

The "three-piece Bézier curve" refers to a spline formed from three individual Bézier curves. Yet the given solution is needlessly complicated. Note that $\frac{y'(t)}{x'(t)}$ for each expression is a constant: 1 for the first part, $-\frac32$ for the second and $-\frac14$ for the third. This means that all three components are straight lines, and checking the endpoints for each (t = 0, 1) confirms that they form a triangle.
Bézier curves are not limited to cubic order; they can also represent lines, with the line from A to B being represented as $(1-t)A+tB$. See the Wikipedia page for more information. Such a representation would have been more appropriate for your triangle.
