Hello <BR>For me it worws perfectly(on miktex2.7), may be&nbsp;you have to delete the spaces between line (if you have copy/paste from the mail of&nbsp;Herbert)<BR>Thanks Herbert &nbsp;<BR><BR><BR><BR><BR>
<BLOCKQUOTE style="BORDER-LEFT: #ff0000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px">&gt; Message du 06/04/09 à 08h54<BR>&gt; De : "Herbert Voss" <HERBERT.VOSS@FU-BERLIN.DE><BR>&gt; A : "Graphics with PSTricks" <PSTRICKS@TUG.ORG><BR>&gt; Copie à : <BR>&gt; Objet : [pstricks] tangent and orthogonal line<BR>&gt; <BR>&gt; <BR>&gt; Hi all,<BR>&gt; I played a bit with tangent and orthogonal lines of a curve<BR>&gt; given by several points and not a function. The following<BR>&gt; example can draw a tangent or an othogonal line to a curve<BR>&gt; defined by three points. Parameters are the coordinates of<BR>&gt; the three points, the x value, and dx<BR>&gt; <BR>&gt; If it may be useful, we can put it into one of the packages.<BR>&gt; <BR>&gt; Herbert<BR>&gt; <BR>&gt; <BR>&gt; \documentclass{minimal}<BR>&gt; \usepackage{pst-3dplot}% for the linear equation system solver<BR>&gt; \makeatletter<BR>&gt; \def\psOrthLine{\pst@object{psOrthLine}}<BR>&gt; \def\psOrthLine@i(#1,#2)(#3,#4)(#5,#6)#7#8{%<BR>&gt; \begin@OpenObj%<BR>&gt; \addto@pscode{<BR>&gt; [[#1 dup dup mul exch 1 #2]<BR>&gt; [#3 dup dup mul exch 1 #4]<BR>&gt; [#5 dup dup mul exch 1 #6]]<BR>&gt; tx@3DPlotDict begin SolveLinEqSystem end %<BR>&gt; /abc ED % save the solution as array<BR>&gt; abc aload pop % a b c on stack<BR>&gt; exch #7 % a c b x<BR>&gt; mul add exch % c+b*x a<BR>&gt; #7 dup mul mul add % a*x^2+b*x+c<BR>&gt; /y0 ED % save value<BR>&gt; abc aload pop pop exch % b a<BR>&gt; #7 mul 2 mul add % b+2*a*x0<BR>&gt; neg 1 exch div % mOrth<BR>&gt; #8 mul /dy ED % mOrth*dx<BR>&gt; [<BR>&gt; #7 #8 add y0 dy add \tx@ScreenCoor % x0+dx y0 +dy<BR>&gt; #7 y0 \tx@ScreenCoor % x0 y0<BR>&gt; /Lineto /lineto load def<BR>&gt; \ifshowpoints true \else false \fi<BR>&gt; \tx@setlinejoin % 0 1 or 2 %<BR>&gt; \tx@Line }% % load the pro function<BR>&gt; \end@OpenObj\ignorespaces}<BR>&gt; \def\psTangentLine{\pst@object{psTangentLine}}<BR>&gt; \def\psTangentLine@i(#1,#2)(#3,#4)(#5,#6)#7#8{%<BR>&gt; \begin@OpenObj%<BR>&gt; \addto@pscode{<BR>&gt; [[#1 dup dup mul exch 1 #2]<BR>&gt; [#3 dup dup mul exch 1 #4]<BR>&gt; [#5 dup dup mul exch 1 #6]]<BR>&gt; tx@3DPlotDict begin SolveLinEqSystem end<BR>&gt; /abc ED<BR>&gt; abc aload pop % a b c on stack<BR>&gt; exch #7 % a c b x<BR>&gt; mul add exch % c+b*x a<BR>&gt; #7 dup mul mul add /y0 ED<BR>&gt; abc aload pop pop exch % b a<BR>&gt; #7 mul 2 mul add % b+2*a*x0=mTan<BR>&gt; dup % mTan mTan<BR>&gt; #8 mul /dy1 ED % mTan*dx<BR>&gt; #8 neg mul /dy2 ED % mTan*-dx<BR>&gt; [<BR>&gt; #7 #8 add y0 dy1 add \tx@ScreenCoor % x0+dx y0 +dy1<BR>&gt; #7 #8 sub y0 dy2 add \tx@ScreenCoor % x0-dx y0 +dy2<BR>&gt; /Lineto /lineto load def<BR>&gt; \ifshowpoints true \else false \fi<BR>&gt; \tx@setlinejoin %<BR>&gt; \tx@Line }%<BR>&gt; \end@OpenObj\ignorespaces}<BR>&gt; \makeatother<BR>&gt; \begin{document}<BR>&gt; <BR>&gt; \psset{unit=2}<BR>&gt; \begin{pspicture}[showgrid=true](1,-1)(4,1)<BR>&gt; \pscurve[showpoints=true](2.1,-0.2)(2.5,0.2)(3.2,0.235)(3.8,-0.2)<BR>&gt; \psOrthLine[arrows=-&gt;,linecolor=red](2.5,0.2)(3.2,0.235)(3.8,-0.2){3}{0.1}<BR>&gt; <BR>&gt; \psTangentLine[arrows=&lt;-&gt;,linecolor=blue](2.5,0.2)(3.2,0.235)(3.8,-0.2){3}{0.5}<BR>&gt; \end{pspicture}<BR>&gt; <BR>&gt; \end{document}<BR>&gt; _______________________________________________<BR>&gt; PSTricks mailing list<BR>&gt; PSTricks@tug.org<BR>&gt; http://tug.org/mailman/listinfo/pstricks<BR>&gt; <BR>&gt; </BLOCKQUOTE>
<P><BR><BR></P>Cordialement<BR>Azzam HASSAN<BR>tel : 06 63 82 97 09<BR><br>
 
<br><hr>Avez-vous vu le nouveau <A href="http://r.voila.fr/r?ref=signature_mail_voila_voilanouveau_1&url=http://www.voila.fr">Voila</A> !</DIV>