HOME

TheInfoList



OR:

Asymptote is a descriptive
vector graphics Vector graphics is a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector display ...
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 Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
, Mac OS,
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
). It is
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, n ...
, available under the terms of the GNU Lesser General Public License (LGPL).


Syntax and notable features

Asymptote typesets labels and equations with
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latexes are found in nature, but synthetic latexes are common as well. In nature, latex is found as a milky fluid found in 10% of all flowering plants (angiosperms ...
, producing high-quality
PostScript PostScript (PS) is a page description language in the electronic publishing and desktop publishing realm. It is a dynamically typed, concatenative programming language. It was created at Adobe Systems by John Warnock, Charles Geschke, Do ...
,
PDF Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
,
SVG Scalable Vector Graphics (SVG) is an XML-based vector image format for defining two-dimensional graphics, having support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium s ...
, or 3D PRC output. It is inspired by
MetaPost MetaPost refers to both a programming language and the interpreter of the MetaPost programming language. Both are derived from Donald Knuth's Metafont language and interpreter. MetaPost produces vector graphic diagrams from a geometric/algeb ...
, but has a C++-like syntax. It provides a language for
typesetting Typesetting is the composition of text by means of arranging physical ''type'' (or ''sort'') in mechanical systems or '' glyphs'' in digital systems representing '' characters'' (letters and other symbols).Dictionary.com Unabridged. Random ...
mathematical figures, just as TeX/
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latexes are found in nature, but synthetic latexes are common as well. In nature, latex is found as a milky fluid found in 10% of all flowering plants (angiosperms ...
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 In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized h ...
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.Surface Parametrization of Nonsimply Connected Planar Bézier Regions, O. Shardt and J. C. Bowman, Computer-Aided Design, 44:5 (2012).
/ref> 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. The program's syntax was originally described by using a yacc compatible grammar.


Application examples

The following source code allows you to draw a graph of the
Heaviside function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argumen ...
by means of the Asymptote language. import graph; import settings; outformat="pdf"; size(300,300); // Function. real[] x1 = ; real[] y1 = ; real[] x2 = ; real[] y2 = ; draw(graph(x1,y1),red+2); draw(graph(x2,y2),red+2); draw((0,0)--(0,1),red+1.5+linetype("4 4")); fill( circle((0,1),0.035), red); filldraw( circle((0,0),0.03), white, red+1.5); // Axes. xaxis( Label("$x$"), Ticks(new real[]), Arrow); yaxis( Label("$y$"), Ticks(new real[]), Arrow, ymin=-0.18, ymax=1.25); // Origin. labelx("$O$",0,SW); The code above yields the following pdf output.


See also

*
GeoGebra GeoGebra (a portmanteau of ''geometry'' and ''algebra'') is an interactive geometry, algebra, statistics and calculus application, intended for learning and teaching mathematics and science from primary school to university level. GeoGebra is ...
– free Dynamic Mathematics program with Asymptote export * PSTricks * TikZ *
PyX A pyx or pix ( la, pyxis, transliteration of Greek: ''πυξίς'', boxwood receptacle, from ''πύξος'', box tree) is a small round container used in the Catholic, Old Catholic and Anglican Churches to carry the consecrated host (Eucharist), ...


References


External links

*
Asymptote official website

Philippe Ivaldi's extensive Asymptote gallery

Asymptote: Art of Problem Solving Wiki

Art of Problem Solving Forum



An Asymptote Tutorial by Charles Staats
{{Vector graphics markup languages Free educational software Free graphics software Free plotting software Free software programmed in C Free software programmed in C++ Linux TeX software TeX SourceForge projects Vector graphics