Algorithmic Mathematical Art

By Xah Lee. Date: . Last updated: .

Here is an introduction and survey of Algorithmic Mathematical Art.

In the early 1990s, they were merely visualization aids in the study of mathematics. Gradually, the complexity and artistry of the images becomes an end itself.

Here, i examine the various methods of algorithmic mathematical art, and indicate the states of the art and possibilities. At the end, i give a definition of Algorithmic Mathematical Art.

Geometric Surfaces

math borg cube 2021-07-27
Borg cube
 max = 5; ContourPlot3D[ Sin[x*y] + Sin[y*z] + Sin[z*x] == 0, {x, -max, max}, {y, -max, max}, {z, -max, max}, Boxed -> False, Axes -> False, Mesh -> None, ContourStyle -> Directive[RandomColor[], Opacity[0.5], Specularity[ 1, 20]]]
Riemann Surface. (source: http://virtualmathmuseum.org/index.html from Richard Palais and Karcher.)

Regular Solids of 3 or more dimensions

linked ring dodecahedron
A dodecahedron formed by pentagonal rings, by Michael Trott of Wolfram Research.
ald-star-lamp2 njd5m
A Islamic lamp in the shape of a stellated polyhedron. (at the entrance of Aladdin hotel resort in Las Vegas, 2013).

Plane Curves

fiery sine fw3cf
fiery
plots of the equation
ContourPlot[ Sin[x*Sin[y]] - Cos[y*Cos[x]] == 0, {x, -10, 20}, {y, -10, 20}, PlotPoints -> 50, ColorFunction -> Hue]
“fiery”, density plot
A density plot version. Heatmap of Trig Expressions

Two-dimensional plots for visual art purposes have not been explored much. Algebraic curves of more than 4 degrees are almost unexplored. One could create a program that systematically generates and plots all possible equations by degree or type, including non-algebraic ones.

Almost all ornamental elements in architecture or interior decorations are based in geometry, and most of them based on curves. Examples of curve based traditional art include: dome, arch, vault (based on arcs of circle), volutes (as scrolls on columns or violins) (based on various spirals), curlicue (based on Cornu spiral, lituus), toy Spirograph (based on roses, cycloidal curves).

Methods of artwork based on curves can include: tangents, envelope, caustics (String art); osculating circles and inversion, evolute/involute, pedal curves, parallel curves, pursuit curves.

Plane Geometry and Processes

Inversion of nested circles can result in many esthetic images.

cir invt filigree
Nested inversion of circles. Circle Inversion Gallery
nested circle inversion 74509
Nested inversion of circles. [source, original in PostScript at http://www.math.uwaterloo.ca/~wgilbert/FractalGallery/Inversive/Inversive.html by William Gilbert. JavaScript version by https://x.com/bitcraftlab at https://codepen.io/bitcraftlab/pen/jyNEry . (local copy Nested Circles Inversion ) ]
MobiusTransforms
Circles generated by Mobius transform, by Ed Pegg Jr. 〔image source 2004-03-15 Math Games column http://www.maa.org/editorial/mathgames/mathgames_03_15_04.html

Geometric inversion can be used as a basis to create other patterns in the plane.

geometric inversion 2021-09-30
geometric inversion 2021-09-30 Geometric Inversion, 2D Tiles

Geometric inversion applies to 3D, and higher dimensions.

geometric inversion 3d tubes 2023-02-21 N6Bhk
geometric inversion 3d tubes 2023-02-21 N6Bhk Geometric Inversion, 3D Tubes
geometric inversion cubes 2021-09-27
geometric inversion cubes 2021-09-27 Geometric Inversion, 3D Cubes
A wallpaper pattern with star motif, cut into a diamond outline, then a fish-eye lens transformation is applied.

For some images of traditional geometric processes, see:

L-Systems, Turtle Graphics

mushroom triangle fractal
“mushroom triangle”, generated by recursive line-replacement
snowflake fractal
A snowflake generated by recursive line-replacement. (from An eye for Fractals, Michael McGuire. 1991. p.16.)
pinwheel tiling
A “Pinwheel tiling”: recursive dissection of a right triangle with sides 1, 2*Sqrt[5].
fed1
Federation Square, Melbourne, Australia.

L-System is a recursive symbol-sequence replacement system originally devised to model plant growth. It is often used to generate self-similar images by interpreting the symbol-sequence as drawing commands or geometric objects. Turtle Graphics is from the programing language Logo, which algorithmically controls the movement of a pen, by specifying directions and pen down or up.

L-System and Turtle Graphics have been somewhat popular among recreational programers. However, there have not been serious studies of visual art possibilities with these methods. Commonly found are illustration of famous plane-filling curves in mathematics, plant-growth modeling, or simplistic symmetric drawings for children as a demo of Logo. Few of them are ingenious.

Plotting of Functions and Processes

Many functions in mathematics can be visualized as a plot. For curves and surfaces, the plotting scheme is simple. Often just on a 2D grid or 3D grid, with marked axes as coordinate. For other functions, such as vector valued functions, complex valued functions, mathematicians have developed other schemes to visualize these functions. Here are some examples.

Discriminant real part
“The real part of the discriminant as a function of the nome q on the unit disk”, by Linas Vepstas, 2005. 〔image source http://www.linas.org/art-gallery/numberetic/numberetic.html
arg princ1
A plot of the complex-valued function (z-2)^2(z+1-2*i)(z+2+2*i)/z^3. By Hans Lundmark, 2004. 〔image source http://www.mai.liu.se/~halun/complex/domain_coloring-unicode.html

Tilings and Patterns

Crossbw2 Celtic knots strip
A traditional Celtic pattern (by Alastair Luke) The colorings are added on to make it easy to trace. In fact, the whole central cross with its round endings is of one single string. I just used different colors for different segments because otherwise it's one single color.

The main attraction of Celtic knot patterns is their geometric design, but the topological aspect (the “knot”) is also interesting mathematically. One can survey traditional designs to see whether they are really knots, or braids of how many strands, and how they are knotted. I'm not sure this has been studied much. There is little systematic study of algorithmic knot/weaving-pattern generations. (There have been systematic mathematical studies of weavings/fabrics by B Grünbaum and G C Shephard).

57 57color coded
From Islamic Designs for artists and craftspeople , by Eva Wilson, 1988. The right image is colored to show the linkage.
111
a knot design. (from a book, source?)
wickerwork pattern
A weaving pattern (Wickerwork) commonly found in Asian chairs made of rattan.
rattan mesh 2025-06-10 tTm5b
rattan mesh 2025-06-10 tTm5b
star 17 bqtqp sq lotus vine weaving p rb basic islamic p sq squarly weave p
penrose2
penrose2
hyperbolic tiling 2002 by hsaka
Hyperbolic tilings.
A hyperbolic semiregular tesselation. 〔Hyperbolic Planar Tesselations Don Hatch. @ http://www.plunk.org/~hatch/HyperbolicTesselations/

Modern math knowledge adds incredible amount of new possibilities at decorative designs. The math understanding of symmetry, and the discovery of aperiodic tilings, and also designs based on hyperbolic geometry, were all not possible before.

knot tiling
Knots in a geometric framework. http://knotplot.com/

More example of tilings:

Fractals, IFS

newton basin fractal carapace
A plot of root finding algorithm. Newton fractal. 〔Fractal Gallery By Ben Haller. @ http://www.sticksoftware.com/gallery/basins.html
InfernoFull
A plot of a iteration process
Fractal Gallery By Ben Haller. @ http://www.sticksoftware.com/gallery/decomposition.html

Fractals are plots of mathematical objects. They began as a visual aid of a mathematical process. Essentially, each point in the plane is colored according to how that value (x,y) behaves when fed into a formula recursively.

Fractals, by its very nature of garishness and bizarreness, has been extremely popular among computer artists — even those who are not interested in mathematics or computer science. Fractals as a visual art have been explored extensively, and great many varieties and galleries have been created on the web.

The exploration of fractals as a visual art form has somewhat limited expression. Artistic creativity is limited to concocting equations and coloring schemes. Some people have started to mix computer generated fractals with manual manipulations, such as mixing in digitally modified photos. Such artwork ceases being algorithmic or mathematical.

Higher Dimensions

As we understand higher dimensional spaces, it opens a great gate of algorithmic art thru the process of projection or slicing of higher dimensional objects to 3-dimensional space or the plane.

Non-Euclidean geometry and higher dimensional geometry and topology are understood by only a few mathematicians in the world. (perhaps a few thousand people, or less if we are specific in the field) Consequently, artistic exploits thru their understanding are basically non-existent. Almost all ideas discussed in this page can be thought about in higher dimensions and or non-Euclidean space. In higher dimensions, there are totally new concepts that are non-existent in lower dimensions. (orientability, embedding, isotropism, etc) As math and technology march on, we may see more visual art explorations thru higher dimensions.

As a example, one idea of creating tilings and patterns is to slice thru some regular lattices of some higher-dimensional manifold. And, we may ask whether it is possible to encode some higher-dimensional manifold properties (such as orientability or the geometry it admits) by a visual exhibition. (i do not quite understand this, but for example, we can illustrate the angle-invariant property of inversion by showing the before and after images of a rectangular grid. We can also show linear and affine transformations by the way they look when applied to a grid. We can show properties of projective transformation and Conic Sections by shadowing. (think of beautiful stained glass in great Cathedrals) We can show homeomorphism or continuous transformation by animation, especially on tilings. We can color surfaces by their curvature, and draw gridlines along constant curvature lines, and show invariance of curvature such as the helicoid-catenoid surface family.

hyperstar
A 3D slice of a regular polytope of higher dimension. From Mark Newbold's Hyperspace Star Polytope Slicer http://dogfeathers.com/java/hyperstar.html
Euclidean honeycomb 2021-07-30
“Uniform Euclidean honeycomb of type affine A3~, trunation type (1, 0, 1, 1)” 〔image source https://x.com/honeycomb_bot/status/1420588146199248898

M C Escher

M C Escher (1898 to 1972) is a Dutch artist whose works are predominated by mathematical themes, many of which are purely algorithmic. Although, Escher is a traditional artist; his algorithmic arts are done manually, not by a program from computer, nor with a explicit algorithmic specification.

It is easy to go from algorithms to visual images, but given a algorithmic artwork, it is difficult to extract the algorithm in the form of a precise runnable program. The following two works by M C Escher illustrates this:

butterfly by M C Escher
butterfly , by M C Escher.
Whirl Pool by M C Escher
Whirlpools, by M C Escher.
Escher Metamorphosis III
metamorphosis, by M C Escher.
Escher's snakes
Snakes, by M C Escher.

(M C Escher's artworks are copyrighted by M.C. Escher Company B.V.)

What is Algorithmic Mathematical Art

A visual artwork is mathematical if:

Algorithmic Artwork

A visual artwork is algorithmic if:

The Algorithm in Algorithmic Mathematical Artwork

Example of Not Algorithmic Mathematical Art

Generative Art

So-called generative art are not mathematical art considered here, because they lack mathematical structure.

generative art 2025-06-07
generative art 2025-06-07

Math-based Art

some Escher's art are works of art illustrating mathematical ideas, but not the mathematical art discussed here.

Moebius Band II-50
Moebius Band II-50
Day and Night
Day and Night

Ray-Traced Computer Graphics

Glasses pov
Glasses pov

Evolutionary Programing and Cellular Automata

Evolutionary programing is a emerging method to generate visual art. The method is often done as genetic programing with human arbiter for judging the survival of the fittest. However, most of the investigations done so far over the 1990s tend to be insults to eye with the excuse of being abstract “art”. They are not mathematical.

wolfram cellular automata rule 110
wolfram cellular automata rule 110 〔image source http://wolframscience.com/
seashell gallery 2025-06-08 19068
seashell gallery 2025-06-08 19068 Seashell Gallery

Related Websites and References

Here are some list of people i know who are doing algorithmic art, mathematical art, or whose artwork are heavily math related:

The following is a annotated list of books that have influenced my outlook one way or another.

Books on Islamic geometric patterns.

Math and Illustrations

Beautiful geometry gallery