Girish Mahajan (Editor)

Asymptote (vector graphics language)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Typing discipline
  
strong

Implementation language
  
C++

Asymptote (vector graphics language)

Paradigm
  
imperative, typesetting

Designed by
  
Andy Hammerlindl, John C. Bowman, Tom Prince

First appeared
  
2004; 13 years ago (2004)

Stable release
  
2.38 / May 12, 2016; 9 months ago (2016-05-12)

Asymptote is a descriptive vector graphics language — developed by Andy Hammerlindl, John C. Bowman (University of Alberta), and Tom Prince — which provides a natural coordinate-based framework for technical drawing. Asymptote runs on all major platforms (Unix, Mac OS, Microsoft Windows). It is free software, available under the terms of the GNU Lesser General Public License (LGPL).

Contents

Syntax and notable features

Asymptote typesets labels and equations with LaTeX, producing high-quality PostScript, PDF, SVG, or 3D PRC output. It is inspired by Metapost, but has a C++-like syntax. It provides a language for typesetting mathematical figures, just as TeX/LaTeX provides a language for typesetting equations. It is mathematically oriented (e.g. rotation of vectors by complex multiplication), and uses the simplex method and deferred drawing to solve overall size constraint issues between fixed-sized objects (labels and arrowheads) and objects that should scale with figure size. Asymptote fully generalizes MetaPost path construction algorithms to three dimensions, and compiles commands into virtual machine code for speed without sacrificing portability. High-level graphics commands are implemented in the Asymptote language itself, allowing them to be easily tailored to specific applications. It also appears to be the first software package to lift TeX into three dimensions. This allows Asymptote to be used as a 3D vector file format.

Asymptote is also notable for having a graphical interface coded in Python (and the Tk widget set), xasy.py — this allows an inexperienced user to quickly draw up objects and save them as .asy source code which can then be examined or edited by hand.

Application examples

The following source code allows you to draw a graph of the Heaviside function by means of the Asymptote language.

References

Asymptote (vector graphics language) Wikipedia