[pstricks] Curved arrowheads

Poul Riis Poul.Riis at skolekom.dk
Thu Jun 10 16:16:52 CEST 2010

I think someone on the list requested arcs with curved arrowheads.
Here is one suggestion - which probably could be greatly improved....

Poul Riis



	/pi 3.141592 def
/newarcarrow { %def
/lw exch def /endang exch def /startang exch def 5.69 mul /rr exch def
5.69 mul /cy exch def 5.69 mul /cx exch def lw setlinewidth 5 lw mul
/ahsize exch def endang startang sub abs pi mul 180 div rr 1 add mul
/smallahsize exch def 5 smallahsize gt {smallahsize /ahsize exch def} if
startang endang lt {/psi rr 1 add ahsize exch div 57 mul neg def cx cy rr
startang endang psi add arc stroke} {/psi rr 1 add ahsize exch div 57 mul
def cx cy rr endang psi add startang arc stroke} ifelse endang cos rr mul
cx add endang sin rr mul cy add moveto 10 10 360 {/ii exch def 3 ii cos 2
mul sub ii 2 mul cos sub 2 mul 9 div /xf exch def ii sin 2 mul ii 2 mul
sin sub 9 div /yf exch def endang psi xf mul add /actang exch def rr
ahsize yf mul add /actrr exch def actang cos actrr mul cx add actang sin
actrr mul cy add lineto} for closepath fill stroke
} bind def

\code{1 0 0 setrgbcolor 0 0 5 0 120 5 newarcarrow 0 1 0 setrgbcolor 0 0 5
120 240 5 newarcarrow 0 0 1 setrgbcolor 10 10 5 0 360 5
newarcarrow}%(xstart, ystart, radius, startang, endang, linewidth)
\psarc[linewidth=5pt,arrows=->](!0 0){7}{0}{120}
\psarc[linewidth=5pt,arrows=->](!0 0){7}{120}{240}
\psarc[linewidth=5pt,arrows=->](!25 10){5}{0}{360}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100610/df8ecafb/attachment.html>

More information about the PSTricks mailing list