The curve
(0,0) parabola (1,1)
is equivalent to
(0,0) .. controls (.5,0) and (0.8875,0.775) .. (1,1)
but the exact parabola is
(0,0) .. controls (1/3,0) and (2/3,1/3) .. (1,1)
We can see in the code of pgfcorepathconstruct.code.tex
at line 1297:
{\pgfqpoint{.5\pgf@xc}{0\pgf@yc}}% found by trial and error {\pgfqpoint{.8875\pgf@xc}{.775\pgf@yc}}% found by trial and error
By the way there is no reason with bend
option to draw a parabola using two cubic curves : any parabola can be drawn by a single quadratic (and so cubic) curve. You can check my answer at TeX.SX.
I think that bend=<point>
should be interpreted as "the bend is over the x coordinate of the point". This is backward compatible when there exist a parabola that has a bend at the point. And in all other cases the current parabola operation is drawing a non parabola curve, so there is no need of backward compatibility.
Also, it will be good to add trough=<point>
option.
Many thanks for the hint. I can confirm this and also added the correct values for the "first" parabola point in the definition (see attached code).
For the record: Finding better solutions also for the
sin
andcos
functions with thebezierplot
package was not successful as can also be seen in the attached code.For your suggestion to the improvement of the
parabola
functionality: I created feature request #117.If you want a "better" approximation for
sin
you can keep0.31831
which is1/pi
but you can replace0.63503
by0.63662
which is2/pi
. And the corresponding values forcos
are0.36338
which is1-2/pi
and0.68169
which is1-1/pi
. But it is not clear that this is a "better" approximation ... it depends how you define "better".Regarding the
sin
/cos
improvement see patch request #26.