Metapost is based on Knuth's METAFONT, but is intended for figures in technical documents according to its primary author, John Hobby. I had hard time understanding its syntax when I discovered it. Asymptote was developed more recently.
So, what are the main differences between Metapost and Asymptote?
On the one hand, I like Metapost because it nicely fits within ConTeX. It is also possible to typeset directly metapost code into a document, see MPlib: MetaPost as a reusable component, TUGboat, Volume 28 (2007), No. 3), and the luamplib package for LuaLaTeX. My preferred textbook is still Metafun, from Hans Hagen:
A simple previewer was made available online by Troy Henderson.
Other useful references are:
- http://zoonek.free.fr/LaTeX/Metapost/metapost.html (French)
- http://melusine.eu.org/syracuse/metapost/ (French)
The current maintainer of MetaPost, Taco Hoekwater, recently announced the release of an alpha version of Metapost 1.5, but I didn't switch. The MP version that comes with TeXLive is actually
$ mpost --version MetaPost 1.211 Copyright 2009 AT&T Bell Laboratories. There is NO warranty. Redistribution of this software is covered by the terms of both the MetaPost copyright and the Lesser GNU Lesser General Public License. For more information about these matters, see the files named COPYING, COPYING.LESSER and the MetaPost source. Primary author of MetaPost: John Hobby. Current maintainer of MetaPost: Taco Hoekwater.
On the other hand, Asymptote is arguably more recent and allows to work in 3D, and also plays nicely with animated PDFs. It is supposed to have a cleaner syntax (I suspect this is also a way to say that some people were quite reluctant to MP syntax), and correct drawing imprecision of Metapost (I should look into more details). There's no internal solver, though; but there is a Metapost compatibility module.
Asymptote can also be used in interactive mode, which is very handy. I personnally added
.profile file so that EPS file are directly previewed using
Other useful references are:
- http://marris.org/asymptote/ (French)
The Asymptote FAQ - Section 8 comes in mind first since it is dedicated to the differences between Asymptote and MetaPost. However, it appears that it merely concentrates on which Asy commands correspond to which MP instructions.
The most interesting thread I found on the web was MP vs. Asymptote ([metapost], Laurence Finston, 2006). Unfortunately, it doesn't provide an in-depth comparison of both languages, although I remain sensible to Finston's arguments.
At risk of being old-fashioned, I like those kind of programs because we don't have to bother with a complex or useless GUI. I must admit I never get used to xfig, and I didn't reinstall it on my Mac: I should give a try to jfig. I know there is OmniGraffle available on OS X; I used it from time to time, but honestly I didn't get ride of all of its features. Anyway, the Graphics page from the ConTeX Navigator includes a lot of useful pointers for those interested in managing graphics and vector drawings with ConTeX.
Ok, it turns out that I barely reviewed existing softwares for producing nice diagrams and drawing, and I still need to experiment MP and Asy a little bit more to get a definitive idea.
(a) It should be noted, however, that MP code can easily be integrated in a ConTeX file too. Likewise, there are now the
asymptote.sty package that allows to embed Asymptote code into a LaTeX document.