size(200); path g = (0,0)..(1,3)..(3,0); draw(g,Arrow(Relative(0.9))); add(arrow(g,invisible,FillDraw(black),Relative(0.5))); add(arrow(reverse(g),invisible,FillDraw(white,black),Relative(0.9)));If both of the arrowheads are to be drawn with filltype NoFill, one will need to create a specialized version of the arrow routine in
plain_arrows.asy
: void arrow(frame f, arrowhead arrowhead=DefaultHead, path g, pen p=currentpen, real size=0, real angle=arrowangle, filltype filltype=arrowhead.defaultfilltype, position position=EndPoint, bool forwards=true, margin margin=NoMargin, bool center=false);
path g=((0,0)--(5cm,0)); draw(reverse(g),Arrow(Relative(0.55)));
DefaultHead.size=new real(pen p=currentpen) {return 2mm;};
plain_arrows.asy
for further examples): arrowhead DotHead; DotHead.head=new path(path g, position position=EndPoint, pen p=currentpen, real size=0, real angle=arrowangle) { if(size == 0) size=DotHead.size(p); bool relative=position.relative; real position=position.position.x; if(relative) position=reltime(g,position); path r=subpath(g,position,0); pair x=point(r,0); real t=arctime(r,size); pair y=point(r,t); return circle(0.5(x+y),0.5size); }; size(100); draw((0,0)..(1,1)..(2,0),Arrow(DotHead)); dot((2,0),red);If you submit your alternate arrowheads to the Forum or the Patch Tracking System, we'll consider including them in a future release.
Asymptote - 2024-11-14