HOME

TheInfoList



OR:

Asymptote is a descriptive
vector graphics Vector graphics are 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 displ ...
language – developed by Andy Hammerlindl, John C. Bowman (University of Alberta), and Tom Prince – which provides a natural coordinate-based framework for
technical drawing Technical drawing, drafting or drawing, is the act and discipline of composing drawings that visually communicate how something functions or is constructed. Technical drawing is essential for communicating ideas in industry and engineering. ...
. Asymptote runs on all major platforms (
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user 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, a ...
,
Mac OS Mac operating systems were developed by Apple Inc. in a succession of two major series. In 1984, Apple debuted the operating system that is now known as the classic Mac OS with its release of the original Macintosh System Software. The system ...
,
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
). It is
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
, available under the terms of the
GNU Lesser General Public License The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
(LGPL).


Syntax and notable features

Asymptote typesets labels and equations with
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well. In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
, producing high-quality
PostScript PostScript (PS) is a page description language and dynamically typed, stack-based programming language. It is most commonly used in the electronic publishing and desktop publishing realm, but as a Turing complete programming language, it c ...
,
PDF Portable document format (PDF), standardized as ISO 32000, is a file format developed by Adobe Inc., Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, computer hardware, ...
, SVG, or 3D PRC output. It is inspired by MetaPost, but has a C-like syntax. It provides a language for
typesetting Typesetting is the composition of text for publication, display, or distribution by means of arranging physical ''type'' (or ''sort'') in mechanical systems or '' glyphs'' in digital systems representing '' characters'' (letters and other ...
mathematical figures, just as
TeX Tex, TeX, TEX, may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Tex Earnhardt (1930–2020), U.S. businessman * Joe Tex (1933–1982), stage name of American soul singer ...
/
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well. In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
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 or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
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 Tex, TeX, TEX, may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Tex Earnhardt (1930–2020), U.S. businessman * Joe Tex (1933–1982), stage name of American soul singer ...
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 Yacc (Yet Another Compiler-Compiler) is a computer program for the Unix operating system developed by Stephen C. Johnson. It is a lookahead left-to-right rightmost derivation (LALR) parser generator, generating a LALR parser (the part of a co ...
compatible grammar.


Application examples

The following source code allows you to draw a graph of the Heaviside function 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 – free Dynamic Mathematics program with Asymptote export * PSTricks * TikZ * PyX


References


External links

*
Asymptote official website

Philippe Ivaldi's extensive Asymptote gallery

Asymptote: Art of Problem Solving Wiki

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 Software using the GNU Lesser General Public License