Asymptote (vector graphics language)
asymptote
|
|
---|---|
![]() |
|
Basic data
|
|
developer | Andy Hammerlindl , John C. Bowman , Tom Prince |
Publishing year | 2004 |
Current version |
2.67 ( August 6, 2020 ) |
operating system | various |
programming language | C ++ |
category | Vector graphic |
License | GNU Lesser General Public License |
asymptote.sourceforge.io |
Asymptote is a vector graphics language developed by Andy Hammerlindl , John C. Bowman ( University of Alberta ), and Tom Prince. It forms a coordinate-based framework for creating technical drawings . It is also the name of software for interpreting this language. These are available in versions for all common platforms such as Unix , Mac OS and Microsoft Windows . The software is open source and released under the GNU Lesser General Public License (LGPL).
Syntax and essential characteristics
Asymptote uses LaTeX for the display of labels and equations . The output is in PostScript , PDF , SVG or 3D Product Representation Compact , a format that allows 3D data to be embedded in a PDF document. Asymptote has MetaPost as a model, but a syntax that is similar to C ++ . Just as TeX / LaTeX is a language for typesetting mathematical equations, Asymptote is a language for representing the resulting function graphs and other geometric figures.
Asymptote is tailored to math applications in every way. So z. B. vectors can be rotated using complex multiplication. A simplex algorithm is used to resolve conflicts between elements that depend on the scale and elements that are independent of the scale (e.g. labels and arrowheads of vectors) . Asymptote has expanded the capabilities of MetaPost to display function processes to include 3-dimensional displays. Asymptote compiles the graphic descriptions into a code that can be run on a virtual machine , so that easy portability is guaranteed.
In Asymptote, complex graphics commands are implemented directly in the language so that applications can be created with little effort. It can therefore be seen as the first software package to make the domain of three-dimensional graphics accessible in TeX. Asymptote source text is therefore suitable as a file format for 3D graphics.
Dissemination and application
In conjunction with LaTeX asymptote is less prevalent in the scientific community as an example, PGF / Ti k Z . Nevertheless, it is included in the package sources of current Linux operating systems (e.g. Fedora and Ubuntu) and is available as a download for Microsoft Windows.
Asymptote is supplied with Xasy. With this GUI application, written in Python (including the Tk Toolkit ), rudimentary asymptote graphics can be created. These can be exported as .asy source code. This can then be modified or expanded by hand.
Sample code
import graph;
size(6cm);
draw((-1,0) -- (-0.5,1) -- (0.5,1) -- (1,0) -- cycle);
dot((-1,0),green);
dot((+1,0),green);
dot((-0.5,1),blue);
dot((+0.5,1),blue);
real f(real x) {return 0.1*cos(2*pi*10*x)*cos(2*pi*1*x) +3/8;}
path g = graph(f,-3/4,3/4,n=1000, join=operator --);
draw(g, gray);
label("Hello world!", (0,0.1));
The asymptote code creates a trapezoid with a “Hello World” label and highlighted corner points. The use of the “graph” library, with which functions can be plotted, is also shown.
The following output PDF document can be generated by calling asy -f pdf helloWorld.asy
.
See also
- Literature on free and open source software
- GeoGebra - Free software for dynamic geometry with export option to Asymptote
- PSTricks - Macro collection for embedding PostScript graphics in TeX or LaTeX
- PGF / Ti k Z - combination of two programming languages for displaying vector graphics
- Graphic formats
Web links
- Project overview for Asymptote at SourceForge
- Asymptote on GitHub
- Philippe Ivaldi: Asymptote: The Vector Graphics Language. 2009, accessed April 30, 2014 .
- Philippe Ivaldi: ASYMPTOTE un puissant langage de graphisme vectoriel. August 4, 2013, accessed April 30, 2014 (French, several hundred programming examples with comments in French).
-
Art of Problem Solving
- Asymptote (Vector Graphics Language). In: Art of Problem Solving (Wiki). Retrieved April 30, 2014 . (inactive)
- Asymptote and GeoGebra. In: Art of Problem Solving (forum). Retrieved April 30, 2014 .
- Wilfried van Hirtum: Asymptote. October 31, 2012, accessed April 30, 2014 (Dutch).
Individual evidence
- ↑ Release 2.67 . August 6, 2020 (accessed August 7, 2020).
- ↑ JC Bowman and A. Hammerlindl: Asymptote: A vector graphics language. (PDF) In: TUGBOAT: The Communications of the TeX Users Group, 29: 2. 2008, pp. 288–294 , accessed April 30, 2014 (English).
- ↑ JC Bowman: The 3D Asymptote Generalization of MetaPost Bézier Interpolation. (PDF) In: Proceedings in Applied Mathematics and Mechanics, 7: 1. 2007, pp. 2010021–2010022 , accessed April 30, 2014 (English).
- ↑ JC Bowman and Orest Shardt: Asymptote: Lifting TeX to three dimensions. (PDF) In: TUGBOAT: The Communications of the TeX Users Group, 30: 1. 2009, pp. 58–63 , accessed April 30, 2014 (English).
- ↑ O. Shardt and JC Bowman: Surface parametrization of Nonsimply Connected Planar Bézier Regions. (PDF) In: Computer-Aided Design, 44: 5 . 2012, accessed April 30, 2014 .
- ↑ Drawing with TeX. Retrieved May 3, 2019 (American English).