[pstricks] psarc

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Nov 22 16:05:14 CET 2008


Poul Riis schrieb:
> Still one problem remains in my figure below: How can I reverse the
> direction of the arrow in case w0y is positive?

that is difficult.
An easy way is to use another (short) \psparabola bow
for the arc with an arrow. E.g.

\psparabola[arrowscale=2,arrows=->,linecolor=Blue1,linewidth=0.25pt]%
  (!x0 0.2 add zT 1 sub)(!xT x0 add zT 3 add)%

the lines are too long, but you'll find better values.
Another, but more difficult solution is to draw the arc
completely inside PostScript. E.g.

\pscustom[linecolor=black,linewidth=0.4pt,arrowscale=2]{%
  \arrows{<->}
  \code{ xT x0 add 5.69 mul /x ED zT 5.60 mul /y ED 1.5 5.69 mul /r ED
         w0y 0 gt
           { x r sub dup y exch 1 add y 1 add 4 2 roll ArrowA pop pop
stroke}
           { x r add dup y exch 1 sub y 1 add 4 2 roll ArrowB pop pop
pop pop stroke}
         ifelse
         x y r 90 w0y abs wang mul sub 90 w0y abs wang mul add arc }
}

look into the documentation for \code and \arrows.


Herbert


More information about the PSTricks mailing list