[pstricks] \multido

Marco Daniel marco.daniel at mada-nada.de
Mon Apr 12 19:41:09 CEST 2010


Hi,

it seems you are evaluate the root of a negative number.

I tried it with postscript itself:

\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{center}
\begin{pspicture*}(-1,-4)(4,4)
\multido{\rA=1+0.5}{8}{
\psarc[linewidth=0.5pt,linecolor=lightgray](0,1){\rA}{-90}{90}
\psarc[linewidth=0.5pt,linecolor=lightgray](0,-1){\rA}{-90}{90}
}
% \multido{\rA=1+0.5}{5}{
% \multido{\rB=1+0.5}{5}{
% \pscircle*(!\rA\space 2 exp 1 sub sqrt 0){0.05}
% \pscircle*(!\rA\space 2 exp \rB\space 2 exp sub 4 add 4 div \rA\space
% div 2 exp neg 1 add sqrt \rA\space mul  \rA\space 2 exp \rB\space 2 exp
% sub 4 add 4 div 1 sub){0.05}
% }}

\listplot[plotstyle=dots,linecolor=red]{
    /rA 1 def
    /rB 1 def
    rA 2 exp rB 2 exp sub 4 add 4 div rA div 2 exp neg 1 add sqrt rA mul
    rA 2 exp rB 2 exp sub 4 add 4 div 1 sub
   5{
     5{
       rA 2 exp rB 2 exp sub 4 add 4 div rA div 2 exp neg 1 add sqrt rA mul
       rA 2 exp rB 2 exp sub 4 add 4 div 1 sub
       /rB rB 0.5 add def
      }repeat
      /rA  rA 0.5 add def
      /rB  1 def
    }repeat
}
\psframe[fillstyle=solid,fillcolor=white,linecolor=white](-0.2,6)(0.5,-6)
\pspolygon[fillstyle=solid,fillcolor=white,linecolor=white](3,6)(3,-6)(6,-6)(6,6)(3,6)
\pspolygon[fillstyle=solid,fillcolor=white,linecolor=white](0,0)(0,-6)(3,-6)(3,-3)(0,0)
\pspolygon[fillstyle=solid,fillcolor=white,linecolor=white](0,0)(0,6)(3,6)(3,3)(0,0)
\psdot(0,1)
\psdot(0,-1)
\psline[linewidth=2pt](3,-3)(3,3)
% \psgrid
\end{pspicture*}
\end{center}
\end{document}



regards
Marco


More information about the PSTricks mailing list