[pstricks] Problem with psbezier curve

Loïc xlogo at free.fr
Sun Dec 7 18:35:21 CET 2008


Hello

I'm working on quadratic PsBezier curve.
--------------------------------------------------
\documentclass[10pt]{article}
\usepackage{pstricks,pst-plot,pstricks-add}
\pagestyle{empty}
\begin{document}
\psset{unit=1 mm}
\psset{linewidth=0.3}
\begin{pspicture}(0,0)(80,80)
\parametricplot[algebraic=true,linecolor=blue]{0}{1}{t^2*80|
80*(2*t-2*t^2)}
\psbezier[showpoints=true](0,0)(0,80)(80,0)
\end{pspicture}
\end{document}
-----------------------------------------------------
In this example, a Bezier curve with three control points is drawn.
those points are A(0,0) B(0,80) and C(80,0)

Each point of the quadratic curve has barycentric coordinates 
A: (1-t)^2 ; B: 2t(1-t) and C: t^2 with value t in [0;1]

That's why I draw the parametric curve (the blue line) with:
x(t)=t^2*80
y(t)=2t(1-t)*80

But I don't understand why those two lines are different? Am I wrong?
Thanks in advance for your help

Loïc









More information about the PSTricks mailing list