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}$
 A: The secret is realizing that the result is supposed to be a triangle. That means that each Bezier segment -- one side of the triangle --- in joining smoothly with the next segment, must have derivative $(0, 0)$ at each end. So your Bezier points, for the first segment of a triangle $ABC$, are $A,A,B,B$; for the second, they're $B,B,C,C$, and for the third, they're $C, C, A, A$. 
The doubling of $A$ in the first segment and of $C$ in the last segment aren't strictly necessary, but when you do this, you get a kind of "wrap around" continuity, where $\gamma'(3) = \gamma'(0)$, where $t \mapsto \gamma(t)$ is your curve, and traverses edge $i$ of the triangle in the interval $i-1 \le t \le i$. 
By the way, this isn't a very well written problem, so you were legitimately confused, I believe. There isn't a unique Bezier curve traversing a triangle, and the phrasing of the problem wrongly suggests that there is. 
A: 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.
