diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/Changes | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf | bin | 1787845 -> 1780776 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | 47 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 40 |
4 files changed, 84 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index ea4a67a0325..e9a470d06ba 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,4 +1,4 @@ -%% $Id: Changes 439 2010-12-18 18:45:23Z herbert $ +%% $Id: Changes 445 2011-01-18 18:43:16Z herbert $ %% pstricks-add.pro ----------- 0.23 2009-12-20 - add RGBtoGRAY and WavelengthToGRAY @@ -39,6 +39,8 @@ pstricks-add.sty ----------- (hv) pstricks-add.tex ----------- (Dominik Rodriguez/hv) + v 3.49 2011-01-18 - add macro \psEllipseTangents for drawing tangent + lines of a point and an ellipse. v 3.48 2010-12-18 - add macro \psCircleTangents for drawing tangent lines of a point and a circle or two circles. v 3.47 2010-12-14 - save the absolute coordinates of \psVector in node names diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf Binary files differindex b2947990e5a..ba27a113b54 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 8cdd5d020d9..88c43ec9e10 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add-doc.tex 439 2010-12-18 18:45:23Z herbert $ +%% $Id: pstricks-add-doc.tex 445 2011-01-18 18:43:16Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside]{pst-doc} \listfiles @@ -336,12 +336,12 @@ and \verb=CircleT2=. \end{lstlisting} \bigskip -When using the other variant of the macro two circles must be given. THe macro then defines +When using the other variant of the macro two circles must be given. The macro then defines ten nodes, named \verb=CircleTC1= and \verb=CircleTC2= for the two intersection points, \verb=CircleTO1=, \verb=CircleTO2=, \verb=CircleTO3=, and \verb=CircleTO4= for the four nodes of the outer tangent lines and \verb=CircleTI1=, \verb=CircleTI2=, \verb=CircleTI3=, and \verb=CircleTI4= for the - four nodes of the inenr tangent lines. + four nodes of the inner tangent lines. \bigskip \begin{pspicture}[showgrid](-2,-2)(10,10) @@ -383,6 +383,47 @@ ten nodes, named \verb=CircleTC1= and \verb=CircleTC2= for the two intersection \clearpage + +%-------------------------------------------------------------------------------------- +\section{\nxLcs{psEllipseTangents}: Calculating tangent lines of an ellipse} +%-------------------------------------------------------------------------------------- + +The macro calculates the two points on an ellipse where tangent lines from an outside point + are drawn. + +\begin{BDef} +\Lcs{psEllipseTangents}\Largr{$x_0,y_0$}\Largr{$a,b$}\Largr{$x_p,y_p$}\\ +\end{BDef} + +The first two pairs of coordinates are the same as the ones for the default ellipse. +The names of the calculates node names are \verb=EllipseT1= +and \verb=EllipseT2=. + +\bigskip +\begin{pspicture}[showgrid](0,3)(10,10) +\psdot(2,4)\psellipse(7,7)(3,1.5) +\psEllipseTangents(7,7)(3,1.5)(2,4) +\pcline[nodesep=-1cm,linecolor=blue](2,4)(EllipseT1) +\pcline[nodesep=-1cm,linecolor=blue](2,4)(EllipseT2) +\psdots(EllipseT1)(EllipseT2) +\uput[-80](EllipseT1){T1}\uput[115](EllipseT2){T2} +\end{pspicture} + + +\begin{lstlisting} +\begin{pspicture}[showgrid](0,3)(10,10) +\psdot(2,4)\psellipse(7,7)(3,1.5) +\psEllipseTangents(7,7)(3,1.5)(2,4) +\pcline[nodesep=-1cm,linecolor=blue](2,4)(EllipseT1) +\pcline[nodesep=-1cm,linecolor=blue](2,4)(EllipseT2) +\psdots(EllipseT1)(EllipseT2) +\uput[-80](EllipseT1){T1}\uput[115](EllipseT2){T2} +\end{pspicture} +\end{lstlisting} + + +\clearpage + %-------------------------------------------------------------------------------------- \section{\nxLcs{psrotate}: Rotating objects} %-------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index 1505289d7ed..3d7da83946c 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 439 2010-12-18 18:45:23Z herbert $ +%% $Id: pstricks-add.tex 445 2011-01-18 18:43:16Z herbert $ %% %% %% This is file `pstricks-add.tex', @@ -31,8 +31,8 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\PSTmathLoaded\endinput\else \input pst-math \fi % -\def\fileversion{3.48} -\def\filedate{2010/12/18} +\def\fileversion{3.49} +\def\filedate{2011/01/18} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -2218,6 +2218,40 @@ dup #1Delta.X m 1 add get mul #1.X m get add #1Tick.X j 3 -1 roll put % s on sta \ignorespaces% } % +\def\psEllipseTangents(#1,#2)(#3,#4)(#5,#6){% (xe,ye)(a,b)(xP,yP) % no optional arguments + \pst@killglue% + \pnode(! + /A #3 def + /B #4 def + /A2 A dup mul def /B2 B dup mul def + #5 #1 sub /Xp ED + #6 #2 sub /Yp ED + A2 B2 mul Xp mul + Yp 4 exp A 6 exp mul + B2 Yp dup mul mul A 6 exp mul sub + B2 Xp dup mul mul Yp dup mul mul A 4 exp mul add sqrt add + Yp dup mul A2 mul B2 Xp dup mul mul add div /Xt ED % the x3 value + Xt dup mul A2 div neg 1 add sqrt B mul /Yt ED + Yt Yp sub Xt Xp sub mul 0 gt { % P is in 1st or 3rd quadrant + Xt dup mul A2 div neg 1 add sqrt neg B mul /Yt ED } if + Xt #1 add Yt #2 add ) {EllipseT1}% + \pnode(! + /A #3 def + /B #4 def + /A2 A dup mul def /B2 B dup mul def + #5 #1 sub /Xp ED + #6 #2 sub /Yp ED + A2 B2 mul Xp mul + Yp 4 exp A 6 exp mul + B2 Yp dup mul mul A 6 exp mul sub + B2 Xp dup mul mul Yp dup mul mul A 4 exp mul add sqrt sub + Yp dup mul A2 mul B2 Xp dup mul mul add div /Xt ED % the x3 value + Xt dup mul A2 div neg 1 add sqrt B mul /Yt ED + Yt Yp sub Xt Xp sub mul 0 lt { % P is in 2nd or 4th quadrant + Xt dup mul A2 div neg 1 add sqrt neg B mul /Yt ED } if + Xt #1 add Yt #2 add ) {EllipseT2}% + \ignorespaces}% +% \def\resetOptions{% \def\pst@linetype{0}% \pstScalePoints(1,1){}{}% |