TITLE: B-Spline how to create control points for a curve to pass through knot values
QUESTION [1 upvotes]: I want to create a b-spline curve that will pass through all the (knot) points I give it. How do I construct it? Do I need to find the control points for that curve? And if so - how?

REPLY [1 votes]: Follows a MATHEMATICA script showing how to construct a special spline type. (Bézier curves) In the script $BL, BQ,BC$ are Bézier curves of first, (linear), second (quadratic) and third (cubic) order and also how them are recursively built. The points $p_1,p_2,p_2,p_4$ can be considered as control points. By properly positioning these control points, we can cause the curve to pass through determined points
$$
\begin{array}{l}
{\text{BL}[\text{p0$\_$},\text{p1$\_$},\text{t$\_$}]\text{:=}(1-t)\text{p0}+t \text{p1}}\\
{\text{BQ}[\text{p0$\_$},\text{p1$\_$},\text{p2$\_$},\text{t$\_$}]\text{:=}(1-t)\text{BL}[\text{p0},\text{p1},t]+t \text{BL}[\text{p1},\text{p2},t]}\\{\text{BC}[\text{p0$\_$},\text{p1$\_$},\text{p2$\_$},\text{p3$\_$},\text{t$\_$}]\text{:=}(1-t)\text{BQ}[\text{p0},\text{p1},\text{p2},t]+t \text{BQ}[\text{p1},\text{p2},\text{p3},t]}
\end{array}
$$
$$
\begin{array}{l}
{p_1=\{0,0\};}\\
{p_2=\{1,1\};}\\
{p_3=\{-1,2\};}\\
{p_4=\{-2,0\};}\\
{\text{gr1}=\text{ParametricPlot}\left[\text{BC}\left[p_1,p_2,p_3,p_4,t\right],\{t,0,1\},\text{PlotStyle}\to \{\text{Blue},\text{Thick}\}\right];}\\
{\text{grp}=\text{Table}\left[\text{Graphics}\left[\left\{\text{Red},\text{Disk}\left[p_k,0.05\right]\right\}\right],\{k,1,4\}\right];}\\
{\text{grl}=\text{ListLinePlot}\left[\left\{p_1,p_2,p_3,p_4\right\},\text{PlotStyle}\to \{\text{Dashed}, \text{Red}\}\right];}\\
{\text{Show}[\text{gr1},\text{grp},\text{grl},\text{PlotRange}\to \text{All}]}
\end{array}
$$
Attached a plot for this setup
{"set_name": "stack_exchange", "score": 1, "question_id": 3055677}