I'm trying to understand how exactly Bezier curves are drawn by TikZ. According to wikipedia, the parametrization of a quadratic Bezier curve is given by B(t) = (1 - t) ((1 - t) P0 + t P1) + t ((1 - t) P1 + t P2. Consider the example y = 2x^2, going through the points P0 = (0,0) and P2 = (1, 2) (blue line below) which can be parametrized as P(t) = (t, 2t^2)
It is easy to calculate
B''(t) = 2 (P2 - 2 P1 + P0) = (2, 4) - 2P1
P''(t) = (0, 4)
From this I can calculate the control point P1 = (1/2, 0) by making B''(t) = P''(t). The result is shown in red below
Clearly the curves are different, which means that the point P1 is not the control point I am supposed to use. Or that the parametrization B(t) that wikipedia uses is not the one used by TikZ. The question is then: what is the actual parametrization used by TikZ?
\documentclass[tikz, border = 5pt]{standalone}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[%
decoration = {markings,
mark = at position 0.5 with {\fill[red, opacity = 0.5] circle (0.05);}
},
]
\draw [help lines] (-1, -1) grid (2, 3);
% parabola
\draw[blue, thick] (0, 0) parabola (1, 2) node[left]{$y=2x^2$};
\fill[blue, opacity = 0.5] (0.5, 0.5) circle (0.05);
% bezier
\draw[red, thick, postaction={decorate}] (0, 0) .. controls (0.5, 0) .. (1, 2) node[midway, right]{bezier};
\end{tikzpicture}
\end{document}
I am aware of this, but I don't think it covers this question.


\draw (A) .. controls (B) .. (C);interpreted by TikZ? – caverac May 18 '18 at 14:36.. controls (c) and (d) ... If theand (d)part is not given,dis assumed to be equal toc(cf. p.149 pfmanual, v3.0.1a). – Paul Gaborit May 18 '18 at 14:44\pgfpathquadraticcurveto{support}{coordinate}. Or does this one also use a cubic Bezier? – caverac May 18 '18 at 14:52parabolain tikz is not rally a parabola. If you want to drawx^2over[0,1]you can use a quadratic curve with control points(0,0) (.5,0) (1,1)or a cubic curve with control points(0,0) (1/3,0) (2/3,1/3) (1,1). – Kpym May 18 '18 at 15:17\draw (A) .. controls (B) .. (C);is equivalent to\draw (A) .. controls (B) and (B) .. (C);and not to the quadratic\draw (A) .. controls ($(A)!2/3!(B)$) and ($(B)!1/3!(C)$) .. (C);is in my opinion a bad design choice. – Kpym May 18 '18 at 15:22