[pstricks] angles and nodes

Antonio Polo antonio.polo at pu.t-com.hr
Sun Feb 5 22:43:57 CET 2006


Please, someone is able to tell me what happens? The command \SpecialCoor 
gives me the possibility to write angles in different ways
[number], [!raw postscript code], [(cartesian or polar or mixed{|} or node)], 
but it seems that I have problems with the "node input", as one can see in the 
example.
%%-----------------------------------------------------------------
\documentclass[a4paper]{article}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{multido}
\pagestyle{empty}
\SpecialCoor
\psset{unit=30pt,showpoints=true,dotstyle=o}
\begin{document}\noindent
%
%Example 1: good output, "number angle" <----------
%
\begin{pspicture}(-3,-3)(3,3)
  \multido{\n=0+30}{12}{%
    \psline(0,0)(2;\n)
    \uput{4pt}[\n](2;\n){$\n^{\circ}$}}
\end{pspicture}
%
%Example 2: good too, "mixed+polar angle"
%
\begin{pspicture}(-3,-3)(3,3)
  \multido{\n=0+30}{12}{%
    \pnode(2;\n){A}
    \psline(0,0)(A)
    \uput{4pt}[(7;\n|7;\n)](A){$\n^{\circ}$}}
\end{pspicture}
%
%Example 3: seems good, "node angle", but it's tricky centered in the origin
%
\begin{pspicture}(-3,-3)(3,3)
  \multido{\n=0+30}{12}{%
    \pnode(2;\n){A}
    \psline(0,0)(A)
    \uput{64pt}[(A)](0,0){$\n^{\circ}$}}
\end{pspicture}
%
%Example 4: good too, "raw-postscript angle"
%
\begin{pspicture}(-3,-3)(3,3)
  \multido{\n=0+30}{12}{%
    \pnode(2;\n){A}
    \psline(0,0)(A)
    \uput{4pt}[!\n\space sin \n\space cos atan](A){$\n^{\circ}$}}
\end{pspicture}
%
%Example 5: very ugly output, "node angle"
%
\begin{pspicture}(-3,-3)(3,3)
  \multido{\n=0+30}{12}{%
    \pnode(2;\n){A}
    \psline(0,0)(A)
    \uput{4pt}[(A)](A){$\n^{\circ}$}}
\end{pspicture}
\end{document}




More information about the PSTricks mailing list