Solution (source code)

= Solution

Choose the knot origin so the span most influenced by $P_i$ is $[i,i+1]$, and use its local parameter $t\in[0,1]$. The three active uniform quadratic <B-spline> basis functions give
$$
C_i(t)=\tfrac12(1-t)^2P_{i-1}+(\tfrac12+t-t^2)P_i+\tfrac12t^2P_{i+1}.
$$
The central coefficient reaches its maximum at $t=1/2$, so this is indeed the span centered on the strongest influence of $P_i$. Express it in the quadratic <Bernstein basis>:
$$
C_i(t)=(1-t)^2B_0+2t(1-t)B_1+t^2B_2.
$$
Matching constant, linear and quadratic coefficients gives the quadratic <Bézier curve> controls
$$
\boxed{B_0=\frac{P_{i-1}+P_i}{2},\qquad B_1=P_i,\qquad B_2=\frac{P_i+P_{i+1}}2}.
$$
For example, $C_i'(0)=2(B_1-B_0)=P_i-P_{i-1}$ and $C_i'(1)=2(B_2-B_1)=P_{i+1}-P_i$, checking the endpoint derivatives and the $C^1$ joins of neighboring spans.