4

For some figures, I need Asymptote over TikZ. However, I like the arrowheads in TikZ more than I do the arrowheads in Asymptote, particularly the stealth' arrowhead in TikZ.

Is there a way to create any (all?) of TikZ's arrowheads---at least stealth'---for Asymptote? (The arrowheads would need to be "flexible" enough to use in 2D or 3D.)

I haven't a clue how to look at TikZ's code for stealth' and mimic it for Asymptote.

MWE:

\documentclass[10pt, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[inline]{asymptote}

\begin{document}
\begin{asy}

settings.outformat="pdf";
settings.prc=false;
settings.render=16;

import graph3;
import three;
unitsize(1cm);

currentprojection = obliqueX;

// AXES
limits((0,0,0), (3,2.5,2.5));
xaxis3(Label("$x$", align=NW), black + linewidth(0.6pt), arrow=Arrow3(size=4, DefaultHead2(normal=Z)));
yaxis3(Label("$y$", align=N), black + linewidth(0.6pt), arrow=Arrow3(size=4, DefaultHead2(normal=Z)));
zaxis3(Label("$z$", align=W), black + linewidth(0.6pt), arrow=Arrow3(size=4, DefaultHead2));
\end{asy}
\end{document}
  • 2
    Welcome to TeX.SE! You can look up the definition of stealth in pgflibraryarrows.code.tex where it is in the code of \pgfarrowsdeclare{stealth'}{stealth'}. Whether or not it is straightforward to convert this to an asymptote code is a different question. You may attract more attention to your nice question if you provide us with the asymptote code in which you want to use these arrows. – marmot Sep 16 '18 at 18:01
  • OK, I added a MWE. – Lucy Sep 16 '18 at 18:33
  • So each of the three arrowheads should be any arrowhead from TIkz (particularly stealth'). – Lucy Sep 16 '18 at 18:37
  • These are 3D arrow. To be honest, I am not convinced if the code of the 2D TikZ arrows can be converted to 3D arrows in a very simple way. Here you can find how to customize 2D arrows. Nevertheless, in section 3.13 of this great tutorial you can find some fancy predefined 3D arrowheads. To me Arrow3(HookHead3) looks a bit like a 3D generalization of stealth' but of course that's not well-defined. – marmot Sep 16 '18 at 18:38
  • I did see those 3D arrowheads in the tutorial. (I'm trying to avoid those 3D arrowheads.) I was just wondering if it's possible to instead replace the arrowheads I'm using in my MWE with arrowheads that look much like TikZ's arrowheads. – Lucy Sep 16 '18 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.