[pstricks] multido again

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Dec 4 23:22:07 CET 2008

Zbigniew Nitecki schrieb:
> I am trying to draw a series of arcs joining the same endpoints, with
> successively larger radii of curvature.  The following code returns an
> error indicating that an exclamation point somewhere is being read as a
> missing number (treated as zero).  What am I doing wrong? (It seems not
> to matter whether or not I put an exclamation point before the lone \rt
> in the first angle specification for the arc).

as Michael already wrote, the radius is read in another way
as the angles. You can redefine the \psarc macro to disable
the check for a unit of the radius.

\def\psarc at iii(#1)#2#3#4{%
  \begin at OpenObj
    \pst at getangle{#3}\pst at tempa
    \pst at getangle{#4}\pst at tempb
    \def\pst at tempA{#2 }
    \ifx\pst at tempa\pst at tempb \else
      \addto at pscode{\psarc at iv \psarc at v}%
      \gdef\psarc at type{0}%
  \end at OpenObj%
\def\psarc at iv{%
  \pst at coor /y ED /x ED
  /r \pst at tempA \pst at number\psunit mul def
  /c 57.2957 r \tx at Div def
    \pst at tempa
    \psk at arcsepA c mul 2 div
    \ifcase\psarc at type add \or sub \fi
    \pst at tempb
    \psk at arcsepB c mul 2 div
    \ifcase\psarc at type sub \or add \fi
  \ifshowpoints\psarc at showpoints\fi
  \ifx\psk at arrowA\@empty
    \ifnum\psk at liftpen=2
      r angleA \tx at PtoC
      y add exch x add exch moveto


     \psarc(!0 \rt\space 2 mul cos neg)%
         {\rt\space cos 2 mul}{\rt}{!180 \rt\space sub}%



More information about the PSTricks mailing list