Asymptote

Asymptote — Free Download. Vector graphics language for mathematical diagrams
Asymptote is a programming language for vector graphics designed to generate technical figures and mathematical diagrams. Instead of manual drawing, Asymptote uses written commands to precisely define shapes, paths, and objects in two and three dimensions. It employs LaTeX for text and equation labeling, ensuring typographic consistency with scientific documents. Output formats include PostScript, PDF, SVG, 3D PRC, and WebGL. The syntax draws inspiration from MetaPost but offers a more powerful C++-like structure with IEEE floating-point arithmetic. The system compiles commands into virtual machine code for speed without sacrificing portability.
5.0(1 ratings)

Download Asymptote (Official links)
File size: 5.9 MB
The latest version of Asymptote is: 3.11
Operating system: Windows, Linux
Languages: English
Price: $0.00 USD

  • draw: renders graphical objects in the output. The draw function accepts a path, graph, or surface and displays it on the output canvas. Parameters include color (rgb), line thickness (linewidth), stroke style (dashed, dotted), and arrowheads. By default it draws a solid black line. This instruction is fundamental for visualizing any geometric element in Asymptote.
  • dot: marks singular points with a circular symbol. The dot function places a small filled circle at specified coordinates. It highlights notable points such as intersections, vertices, or key positions in a graph. Optional parameters define the point color and radius. It is equivalent to drawing a fixed-size circle but optimized for this common purpose.
  • label: inserts text or LaTeX equations into the figure. The label function places a string (with mathematical notation between $...$ or $$...$$) at a given position. Alignment parameters such as N, S, E, O, NE, NW, SE, SW shift the text relative to the anchor point. Essential for adding annotations, axis names, legends, and mathematical expressions while maintaining LaTeX typographic quality.
  • graph: creates a path from a mathematical function. The graph function takes an expression in terms of a variable (typically x) and an interval [a,b] generating a path representing the function curve. It works with explicit functions y(x), parametric forms (x(t),y(t)), or polar coordinates. This command transforms an analytical definition into an interpolated sequence of points for subsequent drawing with draw.
  • axis: constructs coordinate axes with automatic scaling. The axis function draws perpendicular lines representing the X and Y axes of a coordinate system. Arguments define displayed ranges, origin position, inclusion of tick marks, and numerical labeling. Facilitates creation of reference frames for function graphs or experimental data plots.
  • size: sets the total dimensions of the output figure. The size function establishes the final width and height of the graphic in PostScript points (pt) or centimeters (cm). Unlike scale, which modifies proportions, size determines the complete drawing area after resolving constraints between fixed-size objects (labels) and scalable objects. Without this function, Asymptote automatically fits the content.
  • unitsize: defines the real length of user coordinate units. The unitsize function specifies the actual length represented by one unit in the user coordinate system. For example, unitsize(1cm) makes the distance between (0,0) and (1,0) exactly one centimeter in the output. Useful for maintaining absolute proportions when combined with size or when the figure requires specific physical dimensions.
  • fill: colors closed regions with color or patterns. The fill function takes a closed path (such as a circle, polygon, or path returned by graph) and colors its interior with a solid color or defined pattern. Parameters include fill color (fillpen), transparency (opacity), and gradients (gradient). Unlike draw, which only traces the outline, fill modifies the interior of the region.
  • clip: restricts the figure to a specified region. The clip function limits all subsequent drawing to a region defined by a closed path. Any element drawn outside that region becomes hidden. Used to display only a window of interest within a larger graph, to create zoom effects, or to prevent overflow from extended paths.
  • transform: applies geometric operations to paths and objects. The transform function (or predefined types such as shift, rotate, scale, slant) generates an affine transformation matrix that can be applied to paths, coordinate pairs, or entire figures. shift translates, rotate turns around the origin, scale changes size, and slant produces skew. Transformations compose via the * operator and are applied before draw or fill.
  • intersectionpoint: calculates the intersection point between two paths. The intersectionpoint function returns the coordinates (pair type) of the first point where two paths cross. Requires at least one real intersection. Complemented by intersectionpoints (for multiple crossings) and intersections (to obtain path parameters). Fundamental for analytic geometry and constructing diagrams with positional dependencies.
  • buildcycle: constructs a closed path from segments of multiple paths. The buildcycle function takes a sequence of open or closed paths and generates the outline that alternately follows arcs from each, forming a closed region. Especially useful for filling areas bounded by curves that do not directly touch each other (such as two overlapping ellipses or a function and a horizontal line). Automates construction of complex boundaries.
  • settings.outformat: defines the output file format. The settings.outformat variable controls whether output generates as "pdf", "eps", "ps", "svg", "html" (for WebGL), "prc" (3D embedded in PDF), or "png". Assigned before any drawing commands. For example, settings.outformat = "pdf" produces scalable vector graphics ready for inclusion in LaTeX documents. settings.outformat = "html" enables interactive 3D visualization in a web browser.
  • currentprojection: sets the perspective for three-dimensional graphics. In 3D mode, the currentprojection variable defines the camera and projection type (perspective or orthographic) for viewing objects with triple coordinates (x,y,z). Assignable to predefined projections such as oblique, obliqueX, obliqueY, perspective (with vanishing point), or orthographic (without parallel distortion). Affects draw, dot, and label when working with surfaces or solids.
  • triple: represents coordinates in three-dimensional space. The triple type is analogous to pair in 2D but with three components (x,y,z). Functions like (x,y,z) create a triple. Used with draw for 3D segments, with surface for parametric meshes, and with label3 for rotated text in space. Arithmetic operations (addition, subtraction, dot product, cross product) are defined. Essential for graphs of two-variable functions and spatial geometry.

The development history of Asymptote began in 2004 when Andy Hammerlindl, John C. Bowman, and Tom Prince initiated the project at the University of Alberta. The motivation was to overcome MetaPost limitations by incorporating a more robust C++-like syntax, native IEEE floating-point handling, and three-dimensional capabilities. The first public stable version released in 2005. The program is written primarily in C++ for the compiler core and virtual machine, while a significant portion of high-level graphics libraries is implemented in the Asymptote language itself. Over the years, contributors from various institutions added support for 3D PRC embedded in PDF, WebGL export, and multiple improvements to the constraint resolution algorithm using the simplex method.


Alternatives to Asymptote:

TexSlide — Free Download. Native LaTeX integration in presentations

TexSlide

TexSlide is a standalone application that provides complete integration between LaTeX and presentation software.
Price: Free   Size: 49.7 MB   Version: 1.0   OS: Windows, Linux, MacOS