texlive[53354] Master/texmf-dist: pst-eucl (9jan20)

commits+karl at tug.org commits+karl at tug.org
Thu Jan 9 23:10:39 CET 2020


Revision: 53354
          http://tug.org/svn/texlive?view=revision&revision=53354
Author:   karl
Date:     2020-01-09 23:10:39 +0100 (Thu, 09 Jan 2020)
Log Message:
-----------
pst-eucl (9jan20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-eucl/Changes
    trunk/Master/texmf-dist/doc/generic/pst-eucl/pst-eucl-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-eucl/pst-eucl-doc.tex
    trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl.pro
    trunk/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex
    trunk/Master/texmf-dist/tex/latex/pst-eucl/pst-eucl.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl-alt.pro

Modified: trunk/Master/texmf-dist/doc/generic/pst-eucl/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-eucl/Changes	2020-01-09 10:23:54 UTC (rev 53353)
+++ trunk/Master/texmf-dist/doc/generic/pst-eucl/Changes	2020-01-09 22:10:39 UTC (rev 53354)
@@ -1,4 +1,5 @@
 pst-eucl.pro --------
+1.03 2020/01/09     - some new functions for 1.69
 1.02 2019/11/21     - add DeterminantTwo,DeterminantThree,DeterminantFour,DeterminantFive.
 1.01 2012/09/21     - fix for introduced bug
 1.00 2011/08/05     - fix bug in /InterLines
@@ -5,6 +6,14 @@
 
 
 pst-eucl.tex --------
+1.69  2020/01/09 - add macro to get the chord with specified length, \pstCircleChordNode.
+                 - add macro to draw the center of the triangle's escribed circle, \pstTriangleEC.
+                 - add macro to draw the orthocenter of triangle, \pstTriangleHC.
+                 - add macro to draw the gravity center of triangle, \pstTriangleGC.
+                 - update macro \pstTriangleIC and \pstTriangleOC how to control the output points.
+                 - update macro \pstMediatorAB to work with option PointSymbolA and PointSymbolB.
+                 - update macro \pstLineAB to group the parameters as local to avoid affected the other macros.
+                 - update macro \pstTriangle to group the parameters as local to avoid affected the other macros.
 1.68  2019/11/21 - add macros to construct a triangle by SSS, SAS, ASA, AAS, \pstTriangleSSS, \pstTriangleSAS, etc.
                  - add macro to get the bisector node of angle AOB, \pstBisectorAOB, refer to pstBissectBAC, pstOutBissectBAC.
                  - add macro to get the Golden Mean node of a given segment, \pstGoldenMean.

Modified: trunk/Master/texmf-dist/doc/generic/pst-eucl/pst-eucl-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-eucl/pst-eucl-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-eucl/pst-eucl-doc.tex	2020-01-09 10:23:54 UTC (rev 53353)
+++ trunk/Master/texmf-dist/doc/generic/pst-eucl/pst-eucl-doc.tex	2020-01-09 22:10:39 UTC (rev 53354)
@@ -1,6 +1,5 @@
 \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings,
     headexclude,footexclude,oneside,english]{pst-doc}
-\usepackage[utf8]{inputenc}
 \usepackage{pst-eucl}
 \let\pstEuclideFV\fileversion
 \usepackage{multicol}
@@ -8,8 +7,8 @@
 \newtheorem{theorem}{Theorem}
 \usepackage{pst-func,pst-plot,paralist}
 \usepackage[mathscr]{eucal}
-\lstset{pos=l,wide=false,language=PSTricks,
-    morekeywords={multidipole,parallel},basicstyle=\footnotesize\ttfamily}
+
+\lstset{pos=l,wide=false,basicstyle=\footnotesize\ttfamily,explpreset={language=[PSTricks]{TeX}}}
 %
 \def\Argsans#1{$\langle$#1$\rangle$}
 \def\DefaultVal#1{(by default #1)}
@@ -463,7 +462,7 @@
 \pstTriangle[PointSymbol=square,PointSymbolC=o,
   linecolor=blue,linewidth=1.5\pslinewidth]
   (1.5,-1){A}(0,1){B}(-1,-.5){C}
-\pstTriangleIC[linecolor=red]{A}{B}{C}
+\pstTriangleIC[linecolor=cyan]{A}{B}{C}
 \pstTriangleOC[linecolor=red]{A}{B}{C}
 \end{pspicture}
 \end{LTXexample}
@@ -479,9 +478,41 @@
 
 \begin{lstlisting}
 \pstTriangleIC[PosAngle={-90,160},PointName={I,none},PointSymbol={*,none}]{A}{B}{C}[I][D]
+\pstTriangleIC[PosAngle=-90,PointName=I,PointSymbol=*]{A}{B}{C}[I]
 \pstTriangleOC[PosAngle=90,PointSymbol=*,PointName=X]{A}{B}{C}[X]
 \end{lstlisting}
 
+The macros \Lcs{pstTriangleGC}, \Lcs{pstTriangleHC} and \Lcs{pstTriangleEC} are used to draw the barycenter $G$, the orthocentre $H$ and the escenter $E$ of the triangle $ABC$.
+
+\begin{BDef}
+\Lcs{pstTriangleGC}\OptArgs\Largb{A}\Largb{B}\Largb{C}\Largb{G}\OptArg{$M_1$}\OptArg{$M_2$}\\
+\Lcs{pstTriangleHC}\OptArgs\Largb{A}\Largb{B}\Largb{C}\Largb{H}\OptArg{$H_1$}\OptArg{$H_2$}\\
+\Lcs{pstTriangleEC}\OptArgs\Largb{A}\Largb{B}\Largb{C}\Largb{E}\OptArg{$T_1$}
+\end{BDef}
+
+You can use the options of node like as \verb|PointName=...|, \verb|PosAngle=...|, \verb|PointSymbol=...| to control the output nodes $G,H,E$. But if you give the optional output parameters $M_1,M_2$, or $H_1,H_2$ or $T_1$, then you should pass the option value in list like as \verb|PointName={...}|, \verb|PosAngle={...}|, \verb|PointSymbol={...}|.
+For example,
+
+\begin{LTXexample}[width=6cm,pos=l]
+\begin{pspicture}[showgrid=true](-3,-3)(3,2)
+\psset{dotscale=0.5}\psset{PointSymbol=*}\footnotesize
+\pstGeonode[PosAngle=90](0,1){A}
+\pstGeonode[PosAngle=-90](-1,-0.6){B}
+\pstGeonode[PosAngle=-90](1.5,-0.6){C}
+\pstTriangleGC[PointSymbol={*,none,*},PosAngle={150,-80,30}]{A}{B}{C}{G}[M_1][M_2]
+\pstTriangleHC[PointSymbol={*,*,none},PosAngle={-30,-100,30}]{A}{B}{C}{H}[H_1][H_2]
+\pstTriangleEC[PointSymbol={*,none},PosAngle={90,30}]{A}{B}{C}{E_1}[T_1]
+\pstTriangleEC[PointSymbol=*,PosAngle=0]{B}{C}{A}{E_2}
+\pstTriangleEC[PointSymbol=*,PosAngle=180]{C}{A}{B}{E_3}
+\pstLineAB{A}{B}\pstLineAB{B}{C}\pstLineAB{C}{A}
+\pstCircleOA[linestyle=dashed,linecolor=gray!40]{E_1}{T_1}[30][150]
+\pstLineAB[linestyle=dashed,linecolor=blue!40]{A}{M_1}
+\pstLineAB[linestyle=dashed,linecolor=blue!40]{B}{M_2}
+\pstLineAB[linestyle=dashed,linecolor=red!40]{A}{H_1}
+\pstLineAB[linestyle=dashed,linecolor=red!40]{B}{H_2}
+\end{pspicture}
+\end{LTXexample}
+
 \subsection{Angles}
 
 Each angle is defined with three points. The vertex is the second
@@ -808,7 +839,7 @@
 
 If you want to draw a node like \textsf{'Given $EF$, please find node $C$ on $AB$ such that $AC=EF$'},
 you can use the macro \Lcs{pstLocateAB} to do this, it can seek the node $C$ from $A$ to $B$ with the
-specified length, which can be got from \Lcs{pstDist}, \Lcs{pstDistConst}, \Lcs{pstDistAdd}, \Lcs{pstDistSub},
+specified length $L$, which can be got from \Lcs{pstDist}, \Lcs{pstDistConst}, \Lcs{pstDistAdd}, \Lcs{pstDistSub},
 etc.
 
 \begin{BDef}
@@ -845,7 +876,7 @@
 
 If you want to draw a node like \textsf{'Given $EF$, please extend $AB$ to $C$ such that $BC=EF$'},
 you can use the macro \Lcs{pstExtendAB} to do this, it can extend $AB$ from $B$ to one node with the
-specified length, which can be got from \Lcs{pstDist}, \Lcs{pstDistConst}, \Lcs{pstDistAdd}, \Lcs{pstDistSub},
+specified length $L$, which can be got from \Lcs{pstDist}, \Lcs{pstDistConst}, \Lcs{pstDistAdd}, \Lcs{pstDistSub},
 etc.
 
 \begin{BDef}
@@ -942,11 +973,18 @@
 by passing the value $\dfrac{\sqrt{5}-1}{2}|AB|$ to parameter length.
 
 \begin{LTXexample}[width=6cm,pos=l]
-\begin{pspicture}[showgrid=true](0,0)(4,3)
+\begin{pspicture}[showgrid=true](0,1)(4,4)
 \psset{dotscale=0.5}\psset{PointSymbol=*}\footnotesize
-\pstGeonode[PosAngle=90](0,1){A}(4,2){B}
-\pstGoldenMean[PosAngle=90,PointSymbol=o]{A}{B}{C}
-\pstLineAB{A}{B}
+\pstGeonode[PosAngle=-90,CurveType=polyline](0,1){A}(4,2){B}
+\pstGoldenMean[PosAngle=-90,PointSymbol=o]{A}{B}{C}
+% geometrical method to draw the golden point
+\pstMiddleAB[PosAngle=-90]{A}{B}{M}
+\pstRotation[RotAngle=-90,PosAngle=90]{B}{M}[N]
+\pstLineAB[linestyle=dashed,linecolor=gray!60]{A}{N}
+\pstLineAB[linestyle=dashed,linecolor=gray!60]{B}{N}
+\pstInterLC[PointNameA=,PosAngleB=90]{N}{A}{N}{B}{B0}{E}
+\pstCircleOA[linecolor=green!60,linestyle=dashed]{N}{B}[190][300]
+\pstCircleOA[linecolor=purple!60,linestyle=dashed]{A}{E}[0][60]
 \end{pspicture}
 \end{LTXexample}
 
@@ -1225,7 +1263,7 @@
 \pstCircleOA[linecolor=red,Radius=\pstDistAddVal{A}{B}{1.0}{\pstDistConst{0.5}}]{A}{} % R=|AB|+0.5
 \pstCircleOA[linecolor=blue,Radius=\pstDistAddCoef{A}{B}{0.5}{A'}{B'}{1.5}]{A}{} % R=0.5|AB|+1.5|A'B'|
 \pstCircleOA[linecolor=green,Radius=\pstDistSub{A}{B}{A'}{B'}]{B'}{} % R=|AB|-|A'B'|
-\pstCircleOA[linecolor=brown,Radius=\pstDistSubCoef{A}{B}{1.8}{A'}{B'}{0.5}]{A}{} R=1.8|AB|-0.5|A'B'|
+\pstCircleOA[linecolor=brown,Radius=\pstDistSubCoef{A}{B}{1.8}{A'}{B'}{0.5}]{A}{} % R=1.8|AB|-0.5|A'B'|
 \pnode(-1.5,-2){D}
 \pstCircleOA[linecolor=pink,fillstyle=solid,fillcolor=pink!40,Radius=\pstDistMul{A}{B}{0.8}]{D}{} % R=0.8|AB|
 \psdot(D)\uput{0.2}[-45](D){$D$}
@@ -1297,6 +1335,41 @@
 \end{pspicture}
 \end{LTXexample}
 
+Sometimes we need to draw a chord with the given length from the start node,
+it is not possible to get the end node via the already defined macros,
+so we provide the macro \Lcs{pstCircleChordNode} to do this work.
+This macro find the node $X$ on the circle such that the length of chord $AX$ is the given value $L$,
+which can be got from \Lcs{pstDist}, \Lcs{pstDistConst}, \Lcs{pstDistAdd}, \Lcs{pstDistSub}, etc.
+
+\begin{BDef}
+\Lcs{pstCircleChordNode}\OptArgs\Largb{O}\Largb{A}\Largb{$L$}\Largb{X}
+\end{BDef}
+
+The circle is just defined by center $O$ and point $A$ in this macro,
+so you can't omit the parameter $A$.
+
+The direction to find node $X$ is anti-clockwise by default.
+The parameter \Lkeyword{CurvAbsNeg}\DefaultVal{false} can change this behavior.
+
+At last, the chord length $L$ chouldn't large than the diameter of the circle,
+else we will put the node $X$ at origin.
+
+\begin{LTXexample}[width=6cm,pos=l]
+\begin{pspicture}[showgrid=true](-1,-1)(3,3)
+\psset{dotscale=0.5}\psset{PointSymbol=*}\footnotesize
+\pstGeonode[PosAngle={180,0}](1,1){O}(2.5,1){A}
+\pstCircleOA[linecolor=red]{O}{A}
+\pstCircleChordNode[PosAngle=60]{O}{A}{\pstDistConst{1}}{B}
+\pstCircleChordNode[PosAngle=90]{O}{A}{\pstDistConst{2}}{C}
+\pstCircleChordNode[PosAngle=-30,CurvAbsNeg=true]{O}{A}{\pstDistConst{1}}{B'}
+\pstCircleChordNode[PosAngle=-90,CurvAbsNeg=true]{O}{A}{\pstDistConst{2}}{C'}
+\pstLineAB{O}{A}\pstLineAB{O}{B}\pstLineAB{O}{C}
+\pstLineAB{O}{B'}\pstLineAB{O}{C'}
+\pstLineAB{A}{B}\pstLineAB{A}{C}
+\pstLineAB{A}{B'}\pstLineAB{A}{C'}
+\end{pspicture}
+\end{LTXexample}
+
 \vspace{10pt}
 
 A point can be positioned on a circle using its absolute abscissa or ordinate too.
@@ -1937,7 +2010,7 @@
 \pstGeneralEllipseCoef[PosAngle=-100,CodeFigColor=red!50]{2,-2,3,6,5,8}{O_1}{R_1}{MajorRotAngle1}
 \pstGeneralEllipse[linecolor=red!60](O_1)(R_1)[MajorRotAngle1]
 %3x^2-2xy+2y^2-3x+6y+3=0
-\pstGeneralEllipseCoef[PosAngle=-80,CodeFigColor=purple!50]{3,-2,2,-3,5,2}{O_2}{R_2}{MajorRotAngle2}
+\pstGeneralEllipseCoef[PosAngle=-80,CodeFigColor=purple!50]{3,-2,2,-3,6,3}{O_2}{R_2}{MajorRotAngle2}
 \pstGeneralEllipse[linecolor=purple!60](O_2)(R_2)[MajorRotAngle2]
 %x^2-xy+y^2+x-3y+1=0
 \pstGeneralEllipseCoef[PosAngle=-90,CodeFigColor=green!50]{1,-1,1,1,-3,1}{O_3}{R_3}{MajorRotAngle3}

Deleted: trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl-alt.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl-alt.pro	2020-01-09 10:23:54 UTC (rev 53353)
+++ trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl-alt.pro	2020-01-09 22:10:39 UTC (rev 53354)
@@ -1,132 +0,0 @@
-%!
-% PostScript prologue for pst-eucl.tex.
-% Version 1.00 2011/08/04
-% For distribution, see pstricks.tex.
-%
-/tx at EcldDict 40 dict def tx at EcldDict begin
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Pi
-/Pi 3.14159265359 def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% e
-/E 2.718281828459045 def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x -> true (if |x| < 1E-6)
-/ZeroEq { abs 1E-6 lt } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x1 y1 x2 y2 -> a b c (ax-by+c=0 with a^2+b^2=1)
-/EqDr {
-  4 copy 3 -1 roll sub 7 1 roll exch sub 5 1 roll 4 -1 roll
-  mul 3 1 roll mul exch sub
-  2 index dup mul 2 index dup mul add sqrt
-  4 -1 roll 1 index div exch
-  4 -1 roll 1 index div exch
-  4 -1 roll 1 index div exch pop
-} bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% orthogonal projection of M1 onto (OM2)
-%% x1 y1 x2 y2 -> x3 y3
-/Project {
-  2 copy dup mul exch dup mul add 5 1 roll 2 copy 5 -1 roll mul exch
-  5 -1 roll mul add 4 -1 roll div dup 4 -1 roll mul exch 3 -1 roll mul
-} bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% a b c (ax2+bx+c=0) -> x1 y1
-/SolvTrin {
-  /c exch def /b exch def /a exch def
-  b dup mul a c mul 4 mul sub dup 0 lt
-  { pop 0 0 } %% no solutions
-  {sqrt dup b neg add a 2 mul div exch b add neg 2 a mul div }
-  ifelse } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x1 y1 x2 y2 -> Dist
-/ABDist { 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x1 y1 x2 y2 -> x1-x2  y1-y2
-/ABVect { 3 -1 roll exch sub 3 1 roll sub exch } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x1 y1 x2 y2 x3 y3 x4 y4 -> x y
-/InterLines {
-  EqDr /D1c exch def /D1b exch def /D1a exch def
-  EqDr /D2c exch def /D2b exch def /D2a exch def
-  D1a D2b mul D1b D2a mul sub dup ZeroEq
-%   { pop pop pop 0 0 } %% parallel lines  % --- hv 20110714
-   { pop 0 0 } %% parallel lines             --- hv 20110714
-   {
-    /Det exch def
-    D1b D2c mul D1c D2b mul sub Det div
-    D1a D2c mul D2a D1c mul sub Det div
-   } ifelse  } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% a b c R -> x1 y1 x2 y2
-/InterLineCircle {
-  /CR exch def /Dc exch def neg /Db exch def /Da exch def
-  ABVect /Vy exch def /Vx exch def
-  %% Dc==0 then O belong to the line
-  %% First project O on the line -> M (-ca;-cb)
-  %% l'abscisse de M sur (OM) divis\xE9e par R donne le cosinus
-  %Dc neg dup Db mul exch Da mul 2 copy 0 0
-  %ABDist dup CR gt { pop pop pop 0 0 0 0 }
-  %{ ZeroEq { pop pop Db Da } if Atan /alpha exch def
-  Dc abs CR gt { 0 0 0 0 } 
-  { Db neg Da neg Atan /alpha exch def
-  Dc CR div dup dup mul 1 exch sub sqrt exch Atan /beta exch def
-  alpha beta add dup cos CR mul exch sin CR mul
-  alpha beta sub dup cos CR mul exch sin CR mul
-  4 copy ABVect Vy mul 0 le exch Vx mul 0 le and
-  { 4 2 roll } if } ifelse
- } def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% R R' OO' -> x1 y1 x2 y2
-/InterCircles {
-  /OOP exch def /CRP exch def /CR exch def
-  OOP dup mul CRP dup mul sub CR dup mul add OOP div 2 div
-  dup dup mul CR dup mul exch sub dup
-  0 lt { pop pop 0 0 0 0 } { sqrt 2 copy neg } ifelse
-} bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x y theta -> x' y' (rotation of theta)
-/Rotate {
-  dup sin /sintheta exch def cos /costheta exch def /y exch def /x exch def
-  x costheta mul y sintheta mul sub
-  y costheta mul x sintheta mul add
-} def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% N -> x y
-/GetNode {
-  tx at NodeDict begin
-    tx at NodeDict 1 index known { load GetCenter } { pop 0 0 } ifelse
-  end
-} bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x -> ch(x)
-/ch { dup Ex exch neg Ex add 2 div } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x -> sh(x)
-/sh { dup Ex exch neg Ex sub 2 div } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x -> e^(x)
-/Ex { E exch exp } bind def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% x f g -> x y n
-/NewtonSolving {
-  /g exch def /f exch def 0
-  { %%% STACK: x0 n
-    1 add exch %% one more loop
-    dup ZeroEq
-    { dup 0.0005 add fgeval
-      1 index 0.0005 sub fgeval sub .001 div }
-    { dup 1.0005 mul fgeval
-      1 index 0.9995 mul fgeval sub .001 2 index mul div } ifelse  %%% STACK: n x0 fg'(x0)
-    %%% compute x1=x0-fg(x0)/fg'(x0)
-    1 index fgeval exch div dup 4 1 roll sub exch %% stack: dx x0 n
-    3 -1 roll ZeroEq              %% exit if root found
-    1 index 100 eq or { exit } if %% or looping for more than 100 times
-  } loop
-  dup 100 lt { exch dup /x exch def f } { pop 0 0 } ifelse
-  3 -1 roll
-} def
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-/fgeval { /x exch def f g sub } bind def
-end
-% END ps-euclide.pro

Modified: trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl.pro	2020-01-09 10:23:54 UTC (rev 53353)
+++ trunk/Master/texmf-dist/dvips/pst-eucl/pst-eucl.pro	2020-01-09 22:10:39 UTC (rev 53354)
@@ -1,6 +1,6 @@
 %!
 % PostScript prologue for pst-eucl.tex.
-% Version 1.02 2012/11/21
+% Version 1.03 2020/01/09
 % For distribution, see pstricks.tex.
 %
 /tx at EcldDict 40 dict def tx at EcldDict begin

Modified: trunk/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex	2020-01-09 10:23:54 UTC (rev 53353)
+++ trunk/Master/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex	2020-01-09 22:10:39 UTC (rev 53354)
@@ -20,8 +20,8 @@
 \csname PSTEuclideLoaded\endcsname
 \let\PSTEuclideLoaded\endinput
 %
-\def\fileversion{1.68}
-\def\filedate{2019/11/21}
+\def\fileversion{1.69}
+\def\filedate{2020/01/09}
 %%
 \message{`PST-Euclide v\fileversion, \filedate\space (dr,hv)}%
 %% prologue for postcript
@@ -533,8 +533,12 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% #2 #4 #6 -> coordinates for nodes
 %% #3 #5 #7 -> nodes name
-\def\pstTriangle{\pst at object{pstTriangle}}%
-\def\pstTriangle at i{\@ifnextchar(\pstTriangle at ii{\pstTriangle at ii(0,0)}}%
+\def\pstTriangle{\@ifnextchar[\Pst at Triangle{\Pst at Triangle[]}}
+\def\Pst at Triangle[#1]{%
+  \begingroup
+    \psset{#1}%
+    \@ifnextchar(\pstTriangle at ii{\pstTriangle at ii(0,0)}%
+}
 \def\pstTriangle at ii(#1)#2(#3)#4(#5)#6{%
   \pst at killglue
   %%begin modif alaindelplanque 11/2003
@@ -597,7 +601,7 @@
   \Pst at Geonode@i[](#5){#6}%%NEW DR 15112001
   \pst at TraceTriangle{#2}{#4}{#6}%
   \egroup
-}%
+\endgroup}%
 %
 \def\pst at TraceTriangle#1#2#3{\pspolygon(#1)(#2)(#3)}%
 %
@@ -1055,8 +1059,13 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%            Line, circle, Arc
 %% #2 #3 -> 2 nodes defining the line
-\def\pstLineAB{\ncline}%@ifnextchar[\Pst at LineAB{\Pst at LineAB[]}}%
-%\def\Pst at LineAB[#1]#2#3{\ncline[#1]{#2}{#3}}%
+\def\pstLineAB{\@ifnextchar[\Pst at LineAB{\Pst at LineAB[]}}%
+\def\Pst at LineAB[#1]#2#3{%
+  \begingroup
+    \psset{#1}%
+    \ncline{#2}{#3}
+  \endgroup%
+}%
 %
 %% \pstCircleOA[Options]{O}{A}[angleA][angleB]
 %% Draw a Circle with center O from angleA to angleB, going counter clockwise.
@@ -1986,13 +1995,12 @@
 \def\Pst at MediatorAB[#1]#2#3#4#5{%
   \bgroup\psset{#1}%             % Affectation of local parameters
   \bgroup
-    \let\PointSymbol=\psk at PointSymbolA
+    \ifx\psk at PointSymbolA\@none\let\psk at PointSymbol=\@none\else\let\psk at PointSymbol=\psk at PointSymbolA\fi
     \ifx\psk at PointNameA\@undef\else\psset{PointName=\psk at PointNameA}\fi
-  %\Pst at HomO[HomCoef=.5]{#2}{#3}{#4}
-  \Pst at MiddleAB[]{#2}{#3}{#4}
+    \Pst at MiddleAB[]{#2}{#3}{#4}
   \egroup
   \bgroup
-    \let\PointSymbol=\psk at PointSymbolB
+    \ifx\psk at PointSymbolB\@none\let\psk at PointSymbol=\@none\else\let\psk at PointSymbol=\psk at PointSymbolB\fi
     \ifx\psk at PointNameB\@undef\else\psset{PointName=\psk at PointNameB}\fi
   \expandafter\ifx\csname psteucl at old\endcsname\relax%
     \Pst at Rotation[RotAngle=90, CodeFig=false]{#4}{#3}[#5]%%%DR 26032005
@@ -2107,22 +2115,6 @@
     \expandafter\pscurve\@@GenCourbe
   \egroup%
 }%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%              Parallel line
-%% #2 #3 -> nodes defining the line
-%% #3 -> antecedent node
-%% #4 -> node name of the image
-%% #5 -> label
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%              Orthogonal line
-%% #2 #3 -> nodes defining the line
-%% #3 -> antecedent node
-%% #4 -> node name of the image
-%% #5 -> label
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Special macros for parameters
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 %% \pstTriangleIC[Options]{A}{B}{C}[I][D]
 %% Draw the inner circle of triangle ABC
@@ -2132,36 +2124,47 @@
 %% #3 -> [input] the node B
 %% #4 -> [input] the node C
 %% #5 -> [output] optional, the inner circle center I
-%% #6 -> [output] optional, the node on inner circle
+%% #6 -> [output] optional, the node D on inner circle
 \def\pstTriangleIC{\@ifnextchar[\Pst at TriangleIC{\Pst at TriangleIC[]}}
 \def\Pst at TriangleIC[#1]#2#3#4{%
   \begingroup
     \@InitListMng %
-    % we should output none point name and symbol as default
-    % to compat with the old version.
-    \psset{PointName=none,PointSymbol=none}
-    % then comes the user local options.
     \psset{#1}%
     \def\pst at triangle@node at a{#2}
     \def\pst at triangle@node at b{#3}
     \def\pst at triangle@node at c{#4}
-    \@ifnextchar[\Pst at TriangleIC@i{\Pst at TriangleIC@i[IC_O]}}
+    \@ifnextchar[\Pst at TriangleIC@i{\Pst at TriangleIC@j[IC_O]}}
 \def\Pst at TriangleIC@i[#1]{%
     \def\pst at triangle@inner at center{#1}
-    \@ifnextchar[\Pst at TriangleIC@j{\Pst at TriangleIC@j[IC_OAB]}}
-\def\Pst at TriangleIC@j[#1]{%
-    \begingroup
-    \psset{PointSymbol=none,PointName=none,linestyle=none,CodeFig=false}
-    \pstBissectBAC{\pst at triangle@node at c}{\pst at triangle@node at a}{\pst at triangle@node at b}{@PST at TRIANGLE@IC_BC}
-    \pstBissectBAC{\pst at triangle@node at b}{\pst at triangle@node at c}{\pst at triangle@node at a}{@PST at TRIANGLE@IC_AB}
-    \pstInterLL{\pst at triangle@node at c}{@PST at TRIANGLE@IC_AB}{\pst at triangle@node at a}{@PST at TRIANGLE@IC_BC}{\pst at triangle@inner at center}
-    \pstProjection{\pst at triangle@node at a}{\pst at triangle@node at b}{\pst at triangle@inner at center}[#1]
-    \endgroup
-    \pstCircleOA{\pst at triangle@inner at center}{#1}
+    \@ifnextchar[\Pst at TriangleIC@ii{\Pst at TriangleIC@ij[IC_OAB]}}
+\def\Pst at TriangleIC@ii[#1]{% display both I and D
+    \def\pst at triangle@inner at IBC{#1}
+    \Pst at TriangleIC@k%
     \Pst at ManageParamList{\pst at triangle@inner at center}%
-    \Pst at ManageParamList{#1}%
+    \Pst at ManageParamList{\pst at triangle@inner at IBC}%
   \endgroup
 }%
+\def\Pst at TriangleIC@ij[#1]{% display I only
+    \def\pst at triangle@inner at IBC{#1}
+    \Pst at TriangleIC@k%
+    \Pst at ManageParamList{\pst at triangle@inner at center}%
+  \endgroup
+}%
+\def\Pst at TriangleIC@j[#1]{% display none point
+    \def\pst at triangle@inner at center{#1}
+    \def\pst at triangle@inner at IBC{IC_OAB}
+    \Pst at TriangleIC@k%
+  \endgroup
+}%
+\def\Pst at TriangleIC@k{% display none point
+  \begingroup
+    \pstBissectBAC[PointSymbol=none,PointName=none,linestyle=none,CodeFig=false]{\pst at triangle@node at c}{\pst at triangle@node at a}{\pst at triangle@node at b}{@PST at TRIANGLE@IC_BC}
+    \pstBissectBAC[PointSymbol=none,PointName=none,linestyle=none,CodeFig=false]{\pst at triangle@node at b}{\pst at triangle@node at c}{\pst at triangle@node at a}{@PST at TRIANGLE@IC_AB}
+    \pstInterLL[PointSymbol=none,PointName=none]{\pst at triangle@node at c}{@PST at TRIANGLE@IC_AB}{\pst at triangle@node at a}{@PST at TRIANGLE@IC_BC}{\pst at triangle@inner at center}
+    \pstProjection[PointSymbol=none,PointName=none]{\pst at triangle@node at a}{\pst at triangle@node at b}{\pst at triangle@inner at center}[\pst at triangle@inner at IBC]
+    \pstCircleOA{\pst at triangle@inner at center}{\pst at triangle@inner at IBC}
+  \endgroup
+}%
 %
 %% \pstTriangleOC[Options]{A}{B}{C}[O]
 %% Draw the outer circle of triangle ABC
@@ -2174,24 +2177,133 @@
 \def\pstTriangleOC{\@ifnextchar[\Pst at TriangleOC{\Pst at TriangleOC[]}}
 \def\Pst at TriangleOC[#1]#2#3#4{%
   \begingroup
-    % we should output none point name and symbol as default
-    % to compat with the old version.
-    \psset{PointName=none,PointSymbol=none}
-    % then comes the user local options.
     \psset{#1}%
     \def\pst at triangle@node at a{#2}
     \def\pst at triangle@node at b{#3}
     \def\pst at triangle@node at c{#4}
-    \@ifnextchar[\Pst at TriangleOC@i{\Pst at TriangleOC@i[OC_O]}}
+    \@ifnextchar[\Pst at TriangleOC@i{\Pst at TriangleOC@j[OC_O]}}
 \def\Pst at TriangleOC@i[#1]{%
-    \begingroup
-    \psset{PointSymbol=none,PointName=none,CodeFig=false}
-    \pstCircleABC{\pst at triangle@node at a}{\pst at triangle@node at b}{\pst at triangle@node at c}{#1}
-    \endgroup
+    \pstCircleABC[PointSymbol=none,PointName=none,CodeFig=false]{\pst at triangle@node at a}{\pst at triangle@node at b}{\pst at triangle@node at c}{#1}
     \Pst at geonodelabel{#1}%
   \endgroup
 }%
+\def\Pst at TriangleOC@j[#1]{% don't output the center point
+    \pstCircleABC[PointSymbol=none,PointName=none,CodeFig=false]{\pst at triangle@node at a}{\pst at triangle@node at b}{\pst at triangle@node at c}{#1}
+  \endgroup
+}%
 %
+%% \pstTriangleGC[Options]{A}{B}{C}{G}[M1][M2]
+%% Draw the gravity center of triangle ABC
+%% Parameters:
+%% #1 -> options
+%% #2 -> [input] the node A
+%% #3 -> [input] the node B
+%% #4 -> [input] the node C
+%% #5 -> [output] the output gravity center G
+%% #6 -> [output] the optional output Middle of BC
+%% #7 -> [output] the optional output Middle of CA
+\def\pstTriangleGC{\@ifnextchar[\Pst at TriangleGC{\Pst at TriangleGC[]}}
+\def\Pst at TriangleGC[#1]#2#3#4#5{%
+  \begingroup
+    \@InitListMng %
+    \psset{#1}%
+    \def\pst at triangle@node at A{#2}
+    \def\pst at triangle@node at B{#3}
+    \def\pst at triangle@node at C{#4}
+    \def\pst at triangle@node at G{#5}
+    \@ifnextchar[\Pst at TriangleGC@i{\Pst at TriangleGC@j[BC_M][CA_M]}}
+\def\Pst at TriangleGC@i[#1][#2]{%
+    \pstMiddleAB[PointName=none,PointSymbol=none]{\pst at triangle@node at B}{\pst at triangle@node at C}{#1}
+    \pstMiddleAB[PointName=none,PointSymbol=none]{\pst at triangle@node at C}{\pst at triangle@node at A}{#2}
+    \pstInterLL[PointName=none,PointSymbol=none]{\pst at triangle@node at A}{#1}{\pst at triangle@node at B}{#2}{\pst at triangle@node at G}
+    \Pst at ManageParamList{\pst at triangle@node at G}%
+    \Pst at ManageParamList{#1}%
+    \Pst at ManageParamList{#2}%
+  \endgroup
+}%
+\def\Pst at TriangleGC@j[#1][#2]{%
+    \pstMiddleAB[PointName=none,PointSymbol=none]{\pst at triangle@node at B}{\pst at triangle@node at C}{#1}
+    \pstMiddleAB[PointName=none,PointSymbol=none]{\pst at triangle@node at C}{\pst at triangle@node at A}{#2}
+    \pstInterLL[PointName=none,PointSymbol=none]{\pst at triangle@node at A}{#1}{\pst at triangle@node at B}{#2}{\pst at triangle@node at G}
+    \Pst at ManageParamList{\pst at triangle@node at G}%
+  \endgroup
+}%
+%
+%% \pstTriangleHC[Options]{A}{B}{C}{H}[H1][H2]
+%% Draw the orthocenter of triangle ABC
+%% Parameters:
+%% #1 -> options
+%% #2 -> [input] the node A
+%% #3 -> [input] the node B
+%% #4 -> [input] the node C
+%% #5 -> [output] the output orthocenter H
+%% #6 -> [output] the optional output perpendicular on BC
+%% #7 -> [output] the optional output perpendicular on CA
+\def\pstTriangleHC{\@ifnextchar[\Pst at TriangleHC{\Pst at TriangleHC[]}}
+\def\Pst at TriangleHC[#1]#2#3#4#5{%
+  \begingroup
+    \@InitListMng %
+    \psset{#1}%
+    \def\pst at triangle@node at A{#2}
+    \def\pst at triangle@node at B{#3}
+    \def\pst at triangle@node at C{#4}
+    \def\pst at triangle@node at H{#5}
+    \@ifnextchar[\Pst at TriangleHC@i{\Pst at TriangleHC@j[BC_H][CA_H]}}
+\def\Pst at TriangleHC@i[#1][#2]{%
+    \pstProjection[PointName=none,PointSymbol=none]{\pst at triangle@node at B}{\pst at triangle@node at C}{\pst at triangle@node at A}[#1]
+    \pstProjection[PointName=none,PointSymbol=none]{\pst at triangle@node at C}{\pst at triangle@node at A}{\pst at triangle@node at B}[#2]
+    \pstInterLL[PointName=none,PointSymbol=none]{\pst at triangle@node at A}{#1}{\pst at triangle@node at B}{#2}{\pst at triangle@node at H}
+    \Pst at ManageParamList{\pst at triangle@node at H}%
+    \Pst at ManageParamList{#1}%
+    \Pst at ManageParamList{#2}%
+  \endgroup
+}%
+\def\Pst at TriangleHC@j[#1][#2]{%
+    \pstProjection[PointName=none,PointSymbol=none]{\pst at triangle@node at B}{\pst at triangle@node at C}{\pst at triangle@node at A}[#1]
+    \pstProjection[PointName=none,PointSymbol=none]{\pst at triangle@node at C}{\pst at triangle@node at A}{\pst at triangle@node at B}[#2]
+    \pstInterLL[PointName=none,PointSymbol=none]{\pst at triangle@node at A}{#1}{\pst at triangle@node at B}{#2}{\pst at triangle@node at H}
+    \Pst at ManageParamList{\pst at triangle@node at H}%
+  \endgroup
+}%
+%
+%% \pstTriangleEC[Options]{A}{B}{C}{E}[H]
+%% Draw the center of the escribed circle which lying out of BC of triangle ABC.
+%
+%% Parameters:
+%% #1 -> options
+%% #2 -> [input] the node A
+%% #3 -> [input] the node B
+%% #4 -> [input] the node C
+%% #5 -> [output] the output excenter E
+%% #6 -> [output] the optional output perpendicular on BC
+\def\pstTriangleEC{\@ifnextchar[\Pst at TriangleEC{\Pst at TriangleEC[]}}
+\def\Pst at TriangleEC[#1]#2#3#4#5{%
+  \begingroup
+    \@InitListMng %
+    \psset{#1}%
+    \def\pst at triangle@node at A{#2}
+    \def\pst at triangle@node at B{#3}
+    \def\pst at triangle@node at C{#4}
+    \def\pst at triangle@node at E{#5}
+    \@ifnextchar[\Pst at TriangleEC@i{\Pst at TriangleEC@j[BC_H]}}
+\def\Pst at TriangleEC@i[#1]{%
+    \pstBissectBAC[PointName=none,PointSymbol=none,linestyle=none]{\pst at triangle@node at B}{\pst at triangle@node at A}{\pst at triangle@node at C}{@PST at TRIANGLE@EC_BC}
+    \pstOutBissectBAC[PointName=none,PointSymbol=none,linestyle=none]{\pst at triangle@node at C}{\pst at triangle@node at B}{\pst at triangle@node at A}{@PST at TRIANGLE@EC_CA}
+    \pstInterLL[PointName=none,PointSymbol=none]{\pst at triangle@node at A}{@PST at TRIANGLE@EC_BC}{\pst at triangle@node at B}{@PST at TRIANGLE@EC_CA}{\pst at triangle@node at E}
+    \pstProjection[PointName=none,PointSymbol=none]{B}{C}{\pst at triangle@node at E}[#1]
+    \Pst at ManageParamList{\pst at triangle@node at E}%
+    \Pst at ManageParamList{#1}%
+  \endgroup
+}%
+\def\Pst at TriangleEC@j[#1]{%
+    \pstBissectBAC[PointName=none,PointSymbol=none,linestyle=none]{\pst at triangle@node at B}{\pst at triangle@node at A}{\pst at triangle@node at C}{@PST at TRIANGLE@EC_BC}
+    \pstOutBissectBAC[PointName=none,PointSymbol=none,linestyle=none]{\pst at triangle@node at C}{\pst at triangle@node at B}{\pst at triangle@node at A}{@PST at TRIANGLE@EC_CA}
+    \pstInterLL[PointName=none,PointSymbol=none]{\pst at triangle@node at A}{@PST at TRIANGLE@EC_BC}{\pst at triangle@node at B}{@PST at TRIANGLE@EC_CA}{\pst at triangle@node at E}
+    \pstProjection[PointName=none,PointSymbol=none]{B}{C}{\pst at triangle@node at E}[#1]
+    \Pst at ManageParamList{\pst at triangle@node at E}%
+  \endgroup
+}%
+%
 %% Distance between two points
 \def\pstDist#1#2{%
   tx at EcldDict begin /N@#1 GetNode /N@#2 GetNode ABDist end
@@ -3102,6 +3214,45 @@
   \endgroup%
 }%
 %
+%% \pstCircleChordNode[Options]{O}{A}{L}{B}
+%% Create a new node B on the Circle O such that the length of chord AB is the given value L.
+%% The circle O is defined by center O and point A on the circle.
+%% The direction can be controled by parameter CurvAbsNeg.
+%% Parameters:
+%% #1 -> options
+%% #2 -> [input] the circle center O
+%% #3 -> [input] the point A on the circle
+%% #4 -> [input] the given chord length
+%% #5 -> [output] the target node name B
+\def\pstCircleChordNode{\@ifnextchar[\Pst at CircleChordNode{\Pst at CircleChordNode[]}}
+\def\Pst at CircleChordNode[#1]{%
+  \begingroup
+    \psset{#1}%
+    \Pst at CircleChordNode@i}
+\def\Pst at CircleChordNode@i#1#2#3#4{%
+  \pst at getcoor{#1}\pst at tempO%
+  \pst at getcoor{#2}\pst at tempA%
+  \pnode(!
+    \pst at tempO \tx at UserCoor % x0,y0
+    \pst at tempA \tx at UserCoor % x1,y1
+    1 index 4 index sub dup mul 1 index 4 index sub dup mul add sqrt % R
+    1 index 4 index sub 3 index 6 index sub atan % RotAngle of A
+    #3 \pst at number\psxunit\space div % chord length in user screen
+    2 index 2 mul 1 index lt {
+      pop pop pop pop pop pop pop 0 0
+    } {
+      0 index 3 index dup mul 4 mul 2 index dup mul sub sqrt atan 2 mul % tan(AOB/2)=d/sqrt(4r^2-d^2)
+      \ifPst at CurvAbsNeg 2 index exch sub \else 2 index add \fi % RotAngle of B = RotAngle of A +/- <AOB
+      dup sin exch cos % sin(B) cos(B)
+      4 index mul 8 index add exch % x=r*cos(AOB)+x0
+      4 index mul 7 index add % y=r*sin(AOB)+y0
+      9 2 roll pop pop pop pop pop pop pop
+    } ifelse
+  ){#4}%
+  \Pst at geonodelabel{#4}%
+  \endgroup%
+}%
+%
 %% \pstCircleTangentLine[Options]{O}{A}{T}
 %% Draw the tangent line from A on the circle, and give the other node B on the line.
 %% The circle O is defined by center O and point A on the circle.

Modified: trunk/Master/texmf-dist/tex/latex/pst-eucl/pst-eucl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-eucl/pst-eucl.sty	2020-01-09 10:23:54 UTC (rev 53353)
+++ trunk/Master/texmf-dist/tex/latex/pst-eucl/pst-eucl.sty	2020-01-09 22:10:39 UTC (rev 53354)
@@ -10,6 +10,6 @@
   [\filedate\space v\fileversion\space `PST-eucl' (dr,hv)]
 \IfFileExists{pst-eucl.pro}{%
   \ProvidesFile{pst-eucl.pro}
-    [2019/11/21 v. 1.02,  PostScript prologue file (hv)]
+    [2020/01/09 v. 1.02,  PostScript prologue file (hv)]
     \@addtofilelist{pst-eucl.pro}}{}%
 \endinput



More information about the tex-live-commits mailing list