[pstricks] pst-eucl: Drawing an angle

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Wed Jan 19 13:55:08 CET 2005


Claus Behl wrote:

> im using pst-eucl for simple geometrical Drawings at school.
> A typical problem is to draw an angle BAC, that means im looking for a 
> Point C, with A the vertex and B a second point given.
> 
> I tried to write a macro (look at my example)
> 
> \pstAngleBAC(B)(A){30}{3}{C}

you can also try to use pstricks-add for your purpose.
The latest pstricks-add from http://perce.de/LaTeX/pstricks-add
loads a config file pstricks-add.cfg (if exists) you can
put your code into such a local config file, run texhash
and then usind the macro. For example

% pstricks-add.cfg --------------
\def\pstAngleBAC{\@ifnextchar[{\pstAngleBAC at i}{\pstAngleBAC at i[]}}
\def\pstAngleBAC at i[#1](#2)(#3)#4#5#6{{%
     \psRelNode[angle=#4](#2)(#3){#5}{temp at node}% A -B - factor - node name
     \pstGeonode[#1](temp at node){#6}%
}}%


and then

\documentclass[a4paper,12pt]{article}
\usepackage{pstricks}
\usepackage{pst-eucl}
\usepackage{pstricks-add}

\begin{document}

\begin{pspicture}(9,6)
\psgrid[gridwidth=0pt,gridcolor=gray,gridlabels=0pt,subgriddiv=2]
\pstGeonode(4,3){A}
\pstGeonode(5,2){B}
\pstLineAB[nodesep=-3,linewidth=0.5pt]{A}{B}
\multido{\iA=0+30}{12}{%
 
\pstAngleBAC[PointSymbol=x,PtNameMath=false,PointName=$\iA^o$](A)(B){\iA}{2}{C}}
\end{pspicture}

\end{document}


but maybe that Dominique will put your macro into pst-eucl

Herbert


-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list