# psbezier and first point

Denis Girou Denis.Girou at idris.fr
Thu Feb 18 22:36:27 CET 1999

-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

>>>>> "Yvon.Thoraval" == Yvon Thoraval <Yvon.Thoraval at wanadoo.fr> writes:

Yvon.Thoraval> it seems that, the starting point of a bezier is at (0,0) , but not
Yvon.Thoraval> always, it depends of the number of control points after.

Yvon.Thoraval> is their a way to control that ?

Yvon.Thoraval> ie avoiding starting with (0,0) but only with the first given point.

If I understand correctly your question, you must define (x0,y0) as (x1,y1)
if you want to define the Bezier curve by three points only.

\documentclass{article}

\usepackage{pstricks}

\pagestyle{empty}

\begin{document}

\psset{subgriddiv=0,showpoints=true,dotscale=2}

\begin{pspicture}(6,6)\psgrid
\psbezier(2,3)(3,0)(5.5,4)
\psbezier[linecolor=red](2,4)(2,4)(3,1)(5.5,5)
\end{pspicture}

\end{document}

P.S. Looking at the \curveto macro (page 39), which is an alternative way,
but probably uninteresting in your case, I found a very old typo which prevent
it to work. I verify that it was already in version 0.93a, so we can deduce
that this macro is not heavily used...

\def\pst at threecoor#1(#2)#3(#4)#5(#6){%
\begingroup
\pst at getcoor{#2}\pst at tempa
\pst at getcoor{#4}\pst at tempb
% D.G. modification begin - Feb. 18, 1999
%\pst at getcoor{#6}\pst at tembc
\pst at getcoor{#6}\pst at tempc
% D.G. modification end
\addto at pscode{\pst at tempa \pst at tempb \pst at tempc #1}%
\endgroup}

D.G.

-----------------------------------------------------------------------------