summaryrefslogtreecommitdiff
path: root/graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex')
-rw-r--r--graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex97
1 files changed, 85 insertions, 12 deletions
diff --git a/graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex b/graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex
index b9000b9750..f719f56f39 100644
--- a/graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex
+++ b/graphics/pstricks/contrib/pst-eucl/doc/pst-eucl-doc.tex
@@ -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 @@ and outer circle of triangle $ABC$.
\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 @@ For example:
\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 @@ It create a new node $X$ on the same line, but when $A,B,C$ are not collinear, w
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 @@ Note that seek from $B$ will get the node $C$ in the reverse order, for example,
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 @@ In fact, we use the macro \Lcs{pstLocateAB} to implement this macro
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 @@ and the parameter to fill the circle.
\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 @@ The circle is defined by center $O$ and point $A$ on the circle or \Lkeyword{Rad
\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 @@ are same with \Lcs{pstGeneralEllipseFle}. They are set to zero if the coeffients
\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}