| 1 |
%% |
| 2 |
%% This is file `pst-geometrictools-doc.tex', |
| 3 |
%% |
| 4 |
%% IMPORTANT NOTICE: |
| 5 |
%% |
| 6 |
%% Package `pst-geometrictools.tex' |
| 7 |
%% |
| 8 |
%% Thomas Söll, Herert Voß |
| 9 |
%% |
| 10 |
%% This program can redistributed and/or modified under %% |
| 11 |
%% the terms of the LaTeX Project Public License %% |
| 12 |
%% Distributed from CTAN archives in directory %% |
| 13 |
%% macros/latex/base/lppl.txt; either version 1.3c of %% |
| 14 |
%% the License, or (at your option) any later version. %% |
| 15 |
%% |
| 16 |
%% DESCRIPTION: |
| 17 |
%% `pst-geometrictools' is a PSTricks package to draw a protractor, a ruler, a compass and pencils |
| 18 |
%% |
| 19 |
%% |
| 20 |
|
| 21 |
|
| 22 |
\listfiles |
| 23 |
\DocumentMetadata{} |
| 24 |
%% $Id: pst-venn-doc.tex 848 2018-12-04 09:25:49Z herbert $ |
| 25 |
\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small, |
| 26 |
headinclude=false,footinclude=false,oneside]{pst-doc} |
| 27 |
|
| 28 |
\usepackage[autostyle]{csquotes} |
| 29 |
%\addbibresource{pst-geometrictools-doc.bib} |
| 30 |
\let\pstpersFV\fileversion |
| 31 |
\usepackage{pst-geometrictools,pst-node,pstricks-add,animate} |
| 32 |
|
| 33 |
\let\belowcaptionskip\abovecaptionskip |
| 34 |
|
| 35 |
\parindent0pt |
| 36 |
|
| 37 |
\psset{arrowlength=2.8,arrowinset=0.1} |
| 38 |
|
| 39 |
\def\bgImage{% |
| 40 |
\begin{pspicture}(-7,-3)(7,7)% |
| 41 |
\psProtractor[ProScale=0.75]{-5}(-2,2)% |
| 42 |
\psRuler[RulerFillCol=Blue!80,RulerScale=0.75]{190}(1,5) |
| 43 |
\psPencil[pencilColA=Green,PenScale=0.75]{10}(-2,2) |
| 44 |
\psPencil[PenLength=2,pencilColA=red,PenScale=0.75]{-20}(1,5) |
| 45 |
\psCompass[PoCScale=1.25,PoCFillCol=Yellow,PoCAngle=0,PoCMineCol=Green]{5}(3.5,-3.5)(7.5,-3.5) |
| 46 |
\end{pspicture} |
| 47 |
} |
| 48 |
|
| 49 |
\lstset{language=PSTricks,morekeywords={psdot,psIntersectionPoint,psProtractor,psCompass,psPencil,psRuler,psParallels,psGetAngleABC,pstGeonode,midAB,pstRightAngle,perspective,multiframe,psline}\footnotesize\ttfamily} |
| 50 |
|
| 51 |
\newpsstyle{Parallelen}{country=G,ProScale=0.5,ProLineCol=cyan,ProFillCol=gray!50,OwnerTxt=Pythagoras,MadeTxt={Geodreieck},RulerFillCol=cyan!40} |
| 52 |
|
| 53 |
|
| 54 |
\begin{document} |
| 55 |
|
| 56 |
\title{pst-geometrictools v 1.4} |
| 57 |
\subtitle{A PSTricks package to draw a protractor, a ruler, a compass and pencils} |
| 58 |
\author{Thomas Söll\\Herbert Voß (bugfixes)} |
| 59 |
\date{\today} |
| 60 |
|
| 61 |
\settitle |
| 62 |
|
| 63 |
\tableofcontents |
| 64 |
|
| 65 |
\begin{abstract} |
| 66 |
The package \LPack{pst-geometrictools} offers some customizable options to setup a \emph{protractor}, a \emph{ruler}, |
| 67 |
a \emph{compass} and \emph{pencils} to the users' wishes. Some geometric tools are predefined |
| 68 |
and ready-to-use for the customer to be able to present some pixel-free graphics showing the handling of some geometric tools. |
| 69 |
|
| 70 |
The geometric tools can be scaled, rotated, positioned, colored as wanted, even labeled---if wanted. |
| 71 |
|
| 72 |
These tools were already available since years within diverse examples---however not yet packaged together in pure PostScript. This was done within this package. |
| 73 |
|
| 74 |
We recommend to use the package \LPack{pst-eucl} (by \textit{Dominique Rodriguez}) which makes it easy to position the tools precisely. |
| 75 |
|
| 76 |
Have fun to use it! |
| 77 |
|
| 78 |
\bigskip |
| 79 |
This program can redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt; |
| 80 |
either version 1.3c of the License, or (at your option) any later version. |
| 81 |
\end{abstract} |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
\clearpage |
| 86 |
|
| 87 |
|
| 88 |
\section{How to use the commands} |
| 89 |
|
| 90 |
\subsection{\textbackslash psProtractor} |
| 91 |
|
| 92 |
\begin{BDef} |
| 93 |
\Lcs{psProtractor}\OptArgs\Largb{angle}\Largr{coordinates of the origin}\\ |
| 94 |
\Lcs{psProtractor}\OptArgs\Largb{angle}\Largr{coordinates of the origin}\Largr{coordinates of a second point} |
| 95 |
\end{BDef} |
| 96 |
|
| 97 |
The command \Lcs{psProtractor} contains the options \nxLkeyword{ProScale=}, \nxLkeyword{ProLineCol=}, \nxLkeyword{ProFillCol=}, \nxLkeyword{OwnerTxt=}, |
| 98 |
\nxLkeyword{MadeTxt=}, \nxLkeyword{PSfontO=}, \nxLkeyword{fontsizeO=}, \nxLkeyword{PSfontM=}, \nxLkeyword{fontsizeM=}, \nxLkeyword{country=} and \nxLkeyword{Ghost=}. |
| 99 |
|
| 100 |
\begin{quote} |
| 101 |
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule |
| 102 |
\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule |
| 103 |
\Lkeyword{ProScale} & 1 & scale factor\\ |
| 104 |
\Lkeyword{ProFillCol} & gray!60 & transparent fill color of the protrace\\ |
| 105 |
\Lkeyword{ProLineCol} & cyan & linecolor of the protrace\\ |
| 106 |
\Lkeyword{OwnerTxt} & T.S. & Name of the owner\\ |
| 107 |
\Lkeyword{MadeTxt} & Made in NES & Made in wherever\\ |
| 108 |
\Lkeyword{PSfontO} & Symbol & PSfont for the owner\\ |
| 109 |
\Lkeyword{fontsizeO} & 10pt & fontsize for the owner\\ |
| 110 |
\Lkeyword{PSfontM} & Times-Roman & PSfont for Made in wherever\\ |
| 111 |
\Lkeyword{fontsizeM} & 6pt & fontsize for Made in wherever\\ |
| 112 |
\Lkeyword{country} & Germany & Permissible values: Germany, France\\ |
| 113 |
\Lkeyword{Ghost} & false & true: not showing the protrace itself, but getting the nodes of its verices\\ |
| 114 |
\bottomrule |
| 115 |
\end{tabularx} |
| 116 |
\end{quote} |
| 117 |
|
| 118 |
This above introduced command \Lcs{psProtractor} automatically provides three nodes of the vertices of the protractor which are named as follows: \texttt{GeodrA}, \texttt{GeodrB}, \texttt{GeodrC} |
| 119 |
|
| 120 |
These nodes maybe very helpful. |
| 121 |
|
| 122 |
The command \Lcs{psProtractor} offers a positioning |
| 123 |
\begin{itemize} |
| 124 |
\item either by one point and an angle of rotation |
| 125 |
\item or by two points (and an additional angle of rotation) |
| 126 |
\end{itemize} |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
\subsection{\textbackslash psRuler} |
| 133 |
|
| 134 |
\begin{BDef} |
| 135 |
\Lcs{psRuler}\OptArgs\Largb{angle}\Largr{coordinates of origin} |
| 136 |
\\ |
| 137 |
\Lcs{psRuler}\OptArgs\Largb{angle}\Largr{coordinates of origin}\Largr{coordinates of a second point} |
| 138 |
\end{BDef} |
| 139 |
|
| 140 |
The command \Lcs{psRuler} contains the options \nxLkeyword{RulerScale=} and \nxLkeyword{RulerFillCol=}. |
| 141 |
|
| 142 |
\begin{quote} |
| 143 |
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule |
| 144 |
\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule |
| 145 |
\Lkeyword{RulerScale} & 1 & scale factor of the ruler\\ |
| 146 |
\Lkeyword{RulerFillCol} & gray & color of the ruler\\ |
| 147 |
\bottomrule |
| 148 |
\end{tabularx} |
| 149 |
\end{quote} |
| 150 |
|
| 151 |
The command \Lcs{psRuler} offers a positioning |
| 152 |
|
| 153 |
\begin{itemize} |
| 154 |
\item either by one point and an angle of rotation |
| 155 |
\item or by two points (and an additional angle of rotation) |
| 156 |
\end{itemize} |
| 157 |
|
| 158 |
|
| 159 |
\definecolor{BrickRed}{rgb}{.702,0.1333,0.1333} |
| 160 |
\definecolor{SeaGreen}{rgb}{.1804,.5451,.34117647} |
| 161 |
|
| 162 |
\begin{pspicture*}[showgrid](-4.0,-10)(6,4.5) |
| 163 |
\psline[linewidth=1pt](-1,0)(5,0) |
| 164 |
\psline[linewidth=0.6pt](4,-.2)(4,.2)\psline[linewidth=0.6pt](0,-.2)(0,.2) |
| 165 |
\rput(3.7,.3){$A$}\rput(0.4,.3){$A'$} |
| 166 |
\rput(2.6,-3.4){$M$}\rput(2.6,3.4){$N$}\rput(2.3,.3){$O$} |
| 167 |
\pnode(4,0){A}\pnode(0,0){B}\pnode(2,-1.5){M}\pnode(2.61,3.76){N1}\pnode(1.41,3.76){N2} |
| 168 |
\pscircle[linewidth=1pt](2,0){2} |
| 169 |
\psarc[linewidth=1pt,linecolor=BrickRed](4,0){4}{110}{250} |
| 170 |
\psarc[linewidth=1pt,linecolor=blue](0,0){4}{-70}{70} |
| 171 |
\psPencil[pencilColA=green,PenLength=3]{-120}(2,4) |
| 172 |
\psRuler[opacity=0.15]{0}(1.96,4)(1.96,-3) |
| 173 |
\psline[linewidth=1pt,linecolor=green](2,-4)(2,4) |
| 174 |
\end{pspicture*} |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
\newpage |
| 180 |
|
| 181 |
|
| 182 |
\subsection{\textbackslash psCompass} |
| 183 |
|
| 184 |
\begin{BDef} |
| 185 |
\Lcs{psCompass}\OptArgs\Largb{radius}\Largr{coordinates of origin}\\ |
| 186 |
\Lcs{psCompass}\OptArgs\Largb{radius}\Largr{coordinates of origin}\Largr{coordinates of a second point} |
| 187 |
\end{BDef} |
| 188 |
|
| 189 |
The command \Lcs{psCompass} contains the options \nxLkeyword{PoCAngle=}, \nxLkeyword{MCAngle=}, \nxLkeyword{PoCLength}, |
| 190 |
\nxLkeyword{PoCFillCol=}, \nxLkeyword{PoCMineCol=}, \nxLkeyword{RadVS=}, \nxLkeyword{AngleVS=}, \nxLkeyword{RadMul=} and \nxLkeyword{PoCScale=}. |
| 191 |
|
| 192 |
\begin{quote} |
| 193 |
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule |
| 194 |
\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule |
| 195 |
\Lkeyword{PoCAngle} & 0 & angle of rotation\\ |
| 196 |
\Lkeyword{PoCLength} & 5 & length of the compass\\ |
| 197 |
\Lkeyword{PoCFillCol} & gray!60 & color of the compass\\ |
| 198 |
\Lkeyword{PoCMineCol} & gray!60 & color of the mine\\ |
| 199 |
\Lkeyword{PoCScale} & 1 & scaling factor \\ |
| 200 |
\Lkeyword{MCAngle} & false & suppresses the initial angle, when two points are given\\ |
| 201 |
\Lkeyword{RadVS} & RVS & PostScript value for the radius\\ |
| 202 |
\Lkeyword{AngleVS} & AVS & PostScript value for the angle\\ |
| 203 |
\Lkeyword{RadMul} & 1 & multiplication factor for the radius\\ |
| 204 |
\bottomrule |
| 205 |
\end{tabularx} |
| 206 |
\end{quote} |
| 207 |
|
| 208 |
The command \Lcs{psCompass} offers a positioning |
| 209 |
\begin{itemize} |
| 210 |
\item either by one point and the radius---a rotation is set with \texttt{[PoCAngle=30]}. |
| 211 |
\item or by two points (the radius and initial angle then are calculated automatically)---if one sets an additional rotation with \texttt{[PoCAngle=30]}, |
| 212 |
these two angles are automatically added. If one will suppress the initial rotation, then set \texttt{[MCAngle=false]}. |
| 213 |
Using \texttt{RadVS=<unique name>} and \texttt{AngleVS=<unique name>} you can use the values of the radius respectively the angle within some PostScript calculations. |
| 214 |
When you like to use a radius other than the distance between the two points that automatically calculates the radius, use \texttt{RadMul=<decimal number>} to multiply the initial radius with this factor. |
| 215 |
\end{itemize} |
| 216 |
|
| 217 |
|
| 218 |
\begin{pspicture}[showgrid](-6,-4)(8,4.5) |
| 219 |
\psline[linewidth=1pt](-1,0)(5,0) |
| 220 |
\psline[linewidth=0.6pt](4,-.2)(4,.2)\psline[linewidth=0.6pt](0,-.2)(0,.2) |
| 221 |
\rput(3.7,.3){$A$}\rput(0.4,.3){$A'$} |
| 222 |
\rput(2.6,-3.4){$M$}\rput(2.6,3.4){$N$}\rput(2.3,.3){$O$}\psdot[dotsize=3pt](2,0) |
| 223 |
\pnode(4,0){A}\pnode(0,0){B}\pnode(2,-1.5){M}\pnode(2.61,3.76){N1}\pnode(1.41,3.76){N2} |
| 224 |
\pscircle[linewidth=1pt](2,0){2} |
| 225 |
\psarc[linewidth=1pt,linecolor=BrickRed](4,0){4}{110}{250} |
| 226 |
\psarc[linewidth=1pt,linecolor=blue](0,0){4}{-70}{70} |
| 227 |
\psscalebox{-1 1}{\psCompass[PoCScale=0.8]{2}(A)(N1)} |
| 228 |
\psCompass[PoCScale=0.8,PoCFillCol=blue]{2}(B)(N2) |
| 229 |
\end{pspicture} |
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
\subsection{\textbackslash psPencil} |
| 235 |
|
| 236 |
\begin{BDef} |
| 237 |
\Lcs{psPencil}\OptArgs\Largb{angle}\Largr{coordinates of the cone end} |
| 238 |
\end{BDef} |
| 239 |
|
| 240 |
The command \Lcs{psPencil} contains the options \nxLkeyword{PenScale=}, \nxLkeyword{PenLength=}, \nxLkeyword{pencilColA=} and \nxLkeyword{pencilColB=}. |
| 241 |
|
| 242 |
\begin{quote} |
| 243 |
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule |
| 244 |
\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule |
| 245 |
\Lkeyword{PenScale} & 1 & scale factor\\ |
| 246 |
\Lkeyword{PenLength} & 5 & length of the pencil\\ |
| 247 |
\Lkeyword{pencilColA} & red & color of the pencil\\ |
| 248 |
\Lkeyword{pencilColB} & HolzCol & color of the wooden cone end \\ |
| 249 |
\bottomrule |
| 250 |
\end{tabularx} |
| 251 |
\end{quote} |
| 252 |
|
| 253 |
|
| 254 |
\newpage |
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
\subsection{\textbackslash psParallels (Idea and realization by \emph{Manuel Luque})} |
| 259 |
|
| 260 |
\begin{BDef} |
| 261 |
\Lcs{psParallels}\OptArgs\Largr{pointA}\Largr{pointB}\Largr{pointC} |
| 262 |
\end{BDef} |
| 263 |
|
| 264 |
The command \Lcs{psParallels} contains the option \nxLkeyword{DistCoeff}. |
| 265 |
|
| 266 |
\begin{quote} |
| 267 |
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule |
| 268 |
\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule |
| 269 |
\Lkeyword{DistCoeff} & 1 & relative disctance between (AB) and C\\ |
| 270 |
\bottomrule |
| 271 |
\end{tabularx} |
| 272 |
\end{quote} |
| 273 |
|
| 274 |
This command is made to directly draw a line parallel to the line containing \texttt{pointA} and \texttt{pointB} |
| 275 |
intersecting at point \texttt{pointC}. |
| 276 |
|
| 277 |
|
| 278 |
\begin{LTXexample}[pos=t,width=\linewidth] |
| 279 |
\psscalebox{0.5}{% |
| 280 |
\begin{pspicture}[showgrid=false](-15,-10)(5,3)% |
| 281 |
\pnode(-6,1){A}\uput[100](A){A} |
| 282 |
\pnode(1,2){B}\uput[100](B){B} |
| 283 |
\pnode(2,0){C}\uput[90](C){C} |
| 284 |
\pcline[linecolor=BrickRed,nodesepA=-2,nodesepB=-2](A)(B)% |
| 285 |
\psParallels[style=Parallelen,RulerScale=0.5,ProScale=1,DistCoeff=1](A)(B)(C) |
| 286 |
\pcline[linecolor=BrickRed](GeodrB)(GeodrA)% |
| 287 |
\midAB(GeodrB)(GeodrA){M}% |
| 288 |
\psPencil[PenLength=5,pencilColA=red,PenScale=0.5]{60}(M) |
| 289 |
\end{pspicture}} |
| 290 |
\end{LTXexample} |
| 291 |
|
| 292 |
|
| 293 |
The command \verb+\psParallels[DistCoeff=1](A)(B)(C){angle}+ allows to draw a parallel through the |
| 294 |
point C with the help of a ruler and protractor. The angle is the one between the pencil and the vertical. |
| 295 |
The command uses the option [DistCoef=] as within pst-eucl. If [DistCoef=0] the hypotenuse of the |
| 296 |
protractor lays on the line (AB), the ruler automatically positions below the protractor. |
| 297 |
|
| 298 |
For an animation, we vary [DistCoef=0..1], the protractor moves along the ruler letting the |
| 299 |
hypotenuse parallel to the line (AB). If [DistCoef=1], the protractor intersects with the point C. |
| 300 |
We can now draw the parallel to (AB) intersecting C. |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
\newpage |
| 307 |
|
| 308 |
|
| 309 |
\section{Basic Examples} |
| 310 |
|
| 311 |
\begin{LTXexample}[pos=t,width=16cm] |
| 312 |
\psscalebox{0.7}{% |
| 313 |
\begin{pspicture}[showgrid=false](-6,-5.5)(10,7) |
| 314 |
\psProtractor{0}(0,0)% origin of the protractor |
| 315 |
\psRuler{0}(0,0)% origin of the ruler |
| 316 |
\psPencil{-30}(6,0)% origin of the pencil |
| 317 |
\psCompass{3}(2,0)% origin of the compass |
| 318 |
\end{pspicture}} |
| 319 |
\end{LTXexample} |
| 320 |
|
| 321 |
We see, that the origins of the \emph{protractor} and \emph{ruler}, \emph{compass} and respectively the \emph{cone end of the pencil} are positioned at $(0|0)$, $(2|0)$, $(6|0)$. Adding an angle rotates the objects around their origins. |
| 322 |
|
| 323 |
For the \emph{protractor} and \emph{ruler}, there are two ways to position them: |
| 324 |
|
| 325 |
\begin{itemize} |
| 326 |
\item one point and an angle, like: |
| 327 |
|
| 328 |
\Lcs{psProtractor}\OptArgs\Largb{<angle>}\Largr{<point>}\\ |
| 329 |
\Lcs{psRuler}\OptArgs\Largb{<angle>}\Largr{<point>} |
| 330 |
|
| 331 |
This is quite self-explanatory. The origin is positioned at the point and the tool is rotated around this point by the chosen angle. |
| 332 |
\item two points and an additional angle, like: |
| 333 |
|
| 334 |
\Lcs{psProtractor}\OptArgs\Largb{<additional angle>}\Largr{<pointA>}\Largr{<pointB>}\\ |
| 335 |
\Lcs{psRuler}\OptArgs\Largb{<additional angle>}\Largr{<pointA>}\Largr{<pointB>} |
| 336 |
|
| 337 |
The origin of the tool is set to pointA. The hypotenuse of the protractor is aligned to the line between pointA and pointB, when the additional angle is chosen to $0$. |
| 338 |
\end{itemize} |
| 339 |
|
| 340 |
|
| 341 |
\newpage |
| 342 |
|
| 343 |
|
| 344 |
\begin{LTXexample}[pos=t,width=16cm] |
| 345 |
\begin{pspicture}(-8,-6.5)(8,2) |
| 346 |
\pnode(-2,-1){A}\psdot[linecolor=Green,dotsize=5pt](A)\uput[90](A){A} |
| 347 |
\pnode(5,-2){B}\psdot[linecolor=Green,dotsize=5pt](B)\uput[180](B){B} |
| 348 |
\psProtractor[ProScale=0.5]{30}(A) |
| 349 |
\psProtractor[ProLineCol=Yellow,ProScale=0.5]{90}(B) |
| 350 |
\end{pspicture} |
| 351 |
\end{LTXexample} |
| 352 |
|
| 353 |
\begin{LTXexample}[pos=t,width=13cm] |
| 354 |
\begin{pspicture}(-8,-6.5)(5,2) |
| 355 |
\pnode(-2,-2){A}\psdot[linecolor=Green,dotsize=5pt](A)\uput[45](A){A} |
| 356 |
\pnode(5,-4){B}\psdot[linecolor=Green,dotsize=5pt](B)\uput[45](B){B} |
| 357 |
\pcline[linecolor=Green](A)(B) |
| 358 |
\psProtractor[ProScale=0.5]{0}(A)(B) |
| 359 |
\psProtractor[ProLineCol=Yellow,ProScale=0.5]{190}(A)(B) |
| 360 |
\end{pspicture} |
| 361 |
\end{LTXexample} |
| 362 |
|
| 363 |
|
| 364 |
\newpage |
| 365 |
|
| 366 |
|
| 367 |
The predefined nodes of a protractor. |
| 368 |
|
| 369 |
\begin{LTXexample}[pos=t,width=13cm] |
| 370 |
\begin{pspicture}(-8,-6.5)(5,0.3) |
| 371 |
\psProtractor[ProScale=0.75]{0}(0,0) |
| 372 |
\psdot[linecolor=Green,dotsize=7pt](GeodrA)\uput[45](GeodrA){GeodrA} |
| 373 |
\psdot[linecolor=Blue,dotsize=7pt](GeodrB)\uput[135](GeodrB){GeodrB} |
| 374 |
\psdot[linecolor=BrickRed,dotsize=7pt](GeodrC)\uput[-90](GeodrC){GeodrC} |
| 375 |
\end{pspicture} |
| 376 |
\end{LTXexample} |
| 377 |
|
| 378 |
Compass |
| 379 |
|
| 380 |
\begin{LTXexample}[pos=t,width=12cm] |
| 381 |
\begin{pspicture}(-6,-2)(6,6)% |
| 382 |
\pnode(-1,0){A}\psdot[dotsize=3pt,linecolor=red](A) |
| 383 |
\pnode(1,0){B}\psdot[dotsize=3pt,linecolor=Green](B) |
| 384 |
\pscircle(A){2} |
| 385 |
\pcline[linecolor=BrickRed,nodesepA=-9,nodesepB=-6](A)(B) |
| 386 |
\psCompass[PoCAngle=70,PoCScale=0.8]{2}(A) |
| 387 |
\pnode(2,0){A}\psdot[dotsize=3pt,linecolor=red](A) |
| 388 |
\pnode(6,0){B}\psdot[dotsize=3pt,linecolor=Green](B) |
| 389 |
\psCompass[PoCScale=1,PoCFillCol=Yellow,PoCAngle=0,PoCMineCol=Green]{5}(A)(B) |
| 390 |
\end{pspicture} |
| 391 |
\end{LTXexample} |
| 392 |
|
| 393 |
|
| 394 |
\newpage |
| 395 |
|
| 396 |
|
| 397 |
\section{Advanced examples} |
| 398 |
|
| 399 |
Measuring the angles of a given triangle. |
| 400 |
|
| 401 |
\begin{LTXexample}[pos=t,width=17cm] |
| 402 |
\newpsstyle{WkMessung}{linestyle=none,AngleValue=true,ArcColor=Green,arrows=->,WedgeOpacity=0.6,WedgeColor=Green!30,LabelSep=1.6,MarkAngleRadius=2.8,linecolor=Green,decimals=1,comma,xShift=-6,yShift=9} |
| 403 |
\newpsstyle{GeoDrG}{country=G,ProScale=1,ProLineCol=Green,ProFillCol=Green!50,OwnerTxt={Pythagoras},MadeTxt={Geodreieck}} |
| 404 |
\begin{pspicture}(0,-1)(17,10) |
| 405 |
\pnode(8,0){S}\uput[d](S){S}\psdot(S) |
| 406 |
\pnode(17,0){B} |
| 407 |
\rput(S){\pnode(7;35){C}} |
| 408 |
\pcline[linecolor=blue,nodesepB=-0](S)(B) |
| 409 |
\pcline[linecolor=red,nodesepB=-2](S)(C) |
| 410 |
\psProtractor[style=GeoDrG]{0}(S)(B) |
| 411 |
\psIntersectionPoint(S)(C)(GeodrB)(GeodrC){D}% pstricks-add |
| 412 |
\pcline[linecolor=Green,arrowinset=0.1,arrowlength=2,linewidth=2pt]{->}([offset=1.5cm]D)(D) |
| 413 |
\psGetAngleABC[style=WkMessung](B)(S)(C){\Large\color{Green}$\alpha$}% pst-eucl |
| 414 |
\rput([offset=4.5]D){\psframebox[framesep=6pt,framearc=0.2]{ |
| 415 |
\begin{minipage}[t]{5.5cm} |
| 416 |
Lege das Geodreieck auf den blauen Schenkel, so dass die Null auf dem Scheitel S liegt. Lies nun am \"au\ss eren Rand den Winkel ab (gr\"uner Pfeil). |
| 417 |
\end{minipage} |
| 418 |
}} |
| 419 |
\end{pspicture} |
| 420 |
\end{LTXexample} |
| 421 |
|
| 422 |
\begin{LTXexample}[pos=t,width=16cm] |
| 423 |
\begin{pspicture}(-9,-6)(7,10) |
| 424 |
\pnode(1,7){A} |
| 425 |
\pnode(-5,0){B} |
| 426 |
\pnode(5,-2){C} |
| 427 |
\pspolygon[linecolor=red](A)(B)(C) |
| 428 |
\psProtractor[ProScale=0.5]{0}(A)(B) |
| 429 |
\psProtractor[ProScale=0.5]{0}(B)(C) |
| 430 |
\psProtractor[ProScale=0.5]{0}(C)(A) |
| 431 |
\end{pspicture} |
| 432 |
\end{LTXexample} |
| 433 |
|
| 434 |
|
| 435 |
\newpage |
| 436 |
|
| 437 |
|
| 438 |
Constructing the height of a given triangle. |
| 439 |
|
| 440 |
\begin{LTXexample}[pos=t,width=16cm] |
| 441 |
\begin{pspicture}(-6,-4.5)(5,8) |
| 442 |
\pnode(1,7){A} |
| 443 |
\pnode(-5,1){B} |
| 444 |
\pnode(3,2){C} |
| 445 |
\uput[ur](A){A} |
| 446 |
\uput[d](B){B} |
| 447 |
\uput[d](C){C} |
| 448 |
\pspolygon(A)(B)(C) |
| 449 |
\pstProjection{B}{C}{A}[A']% pst-eucl |
| 450 |
\psProtractor[ProScale=0.8,OwnerTxt={Height of a triangle},MadeTxt={Made in NES},PSfontO=Helvetica,PSfontM=Times-Roman,fontsizeO=8,fontsizeM=6]{0}(A')(A) |
| 451 |
\pcline[linecolor=red,linestyle=dashed,linewidth=2pt](GeodrC)(A') |
| 452 |
\pstRightAngle[RightAngleType=german]{C}{A'}{A}% pst-eucl |
| 453 |
\end{pspicture} |
| 454 |
\end{LTXexample} |
| 455 |
|
| 456 |
|
| 457 |
\newpage |
| 458 |
|
| 459 |
|
| 460 |
%Using the package \LPack{pst-pers} (by \emph{Manuel Luque} avec la collaboration de \emph{Thomas Söll} et \emph{Jürgen Gilg}), we have the full range to project objects into whatever planes we want. |
| 461 |
% |
| 462 |
%Here we present a little example, setting the protractor into the [$x,y$]-plane, whereas the compass is set into the [$y,z$]-plane. |
| 463 |
% |
| 464 |
%\begin{LTXexample}[pos=t,width=16cm] |
| 465 |
%\begin{pspicture}(-8,-1.75)(9,7) |
| 466 |
%\perspective[normal=0 90](0,0,0){% pst-pers |
| 467 |
%\psarc[linecolor=green](0,0){2}{180}{0} |
| 468 |
%\psProtractor{0}(0,0)(2,0) |
| 469 |
%} |
| 470 |
%\perspective[normal=0 0](0,0,0){% pst-pers |
| 471 |
%\psCompass[PoCAngle=0,PoCScale=1,PoCMineCol=green]{2}(0,0) |
| 472 |
%} |
| 473 |
%\end{pspicture} |
| 474 |
%\end{LTXexample} |
| 475 |
% |
| 476 |
% |
| 477 |
%\newpage |
| 478 |
|
| 479 |
|
| 480 |
%\section{Animations} |
| 481 |
% |
| 482 |
%\begin{LTXexample}[pos=t,width=17cm] |
| 483 |
%\begin{animateinline}[% animate |
| 484 |
%controls, |
| 485 |
%palindrome, |
| 486 |
%begin={\begin{pspicture}(-8,-1.75)(9,7)}, |
| 487 |
%end={\end{pspicture}}]{10}% 10 frames/s (velocity of the animation) |
| 488 |
%\multiframe{73}{rB=0+2.5}{% number of frames |
| 489 |
%\perspective[normal=0 90](0,0,0){% pst-pers |
| 490 |
% \psarc[linecolor=Green](0,0){2}{0}{\rB} |
| 491 |
% \psProtractor[ProLineCol=Yellow]{180}(0,0)(2,0) |
| 492 |
% } |
| 493 |
%\perspective[normal=\rB\space 0](0,0,0){% pst-pers |
| 494 |
% \psCompass[PoCAngle=0,PoCScale=1,PoCMineCol=Green]{2}(0,0) |
| 495 |
% } |
| 496 |
%} |
| 497 |
%\end{animateinline} |
| 498 |
%\end{LTXexample} |
| 499 |
% |
| 500 |
% |
| 501 |
%\clearpage |
| 502 |
|
| 503 |
|
| 504 |
\section{List of all optional arguments for \texttt{pst-geometrictools}} |
| 505 |
|
| 506 |
\xkvview{family=pst-geometrictools,columns={key,type,default}} |
| 507 |
|
| 508 |
|
| 509 |
\clearpage |
| 510 |
|
| 511 |
|
| 512 |
%\nocite{*} |
| 513 |
%\bgroup |
| 514 |
%\RaggedRight |
| 515 |
%\printbibliography |
| 516 |
%\egroup |
| 517 |
|
| 518 |
|
| 519 |
\printindex |
| 520 |
\end{document} |