MetaPost
- John Hobby's page: http://cm.bell-labs.com/who/hobby/MetaPost.html
- Current development: http://foundry.supelec.fr/projects/metapost/
MetaPost is a graphical programming language, based on Donald Knuth's MetaFont. Normally MP graphics are converted to PostScript and used with dvips, but ConTeXt can use it directly with PDF (see MPtoPDF).
MetaPost is ConTeXt's "native" graphics mode, see MetaFun.
Contents
Documentation & Tutorials
- A User's Manual for MetaPost
- Learning METAPOST by doing (this and this link are not working)
- A Beginner's Guide to METAPOST for Creating High-Quality Graphics by Troy Henderson
- MetaFun
- Lots of examples
Different Packages, Extensions & Applications of Metapost
- finomaton - drawing finite state automata
- statsmac - metapost macros for statistics graphs
- MetaUML - MetaPost library for typesetting UML diagrams
3D support
TODO: needs major review (See: To-Do List) |
MetaPost relatives
Font Creation
3D drawing
- Asymptote - inspired by MetaPost & fully generalizes MetaPost path construction algorithms to three-dimensions
Using MP in ConTeXt
The first way is a usable graphic. Such a graphic is calculated anew each time it is used. An example:
\startuseMPgraphic{name} fill fullcircle scaled 5cm withcolor red; \stopuseMPgraphic \useMPgraphic{name}
As said, this graphic is calculated each time it is placed, which can be time consuming. Apart from the time aspect, this also means that the graphic itself is incorporated many times. Therefore, for graphics that don’t change, CONTEXT provides reusable graphics:
\startreusableMPgraphic{name} fill fullcircle scaled 200pt withcolor .625yellow; \stopreusableMPgraphic \reuseMPgraphic{name}
See also section 3.3 of MetaFun manual.