matlab_plots


matlab_plots, a MATLAB code which uses plotting to illustrate a mathematical structure, such as an iterative map, a fractal, a curve or surface.

Licensing:

The information on this web page is distributed under the MIT license.

caustic, a MATLAB code which generates an image of a caustic, by drawing n equally spaced points in a circle, and then connecting specific pairs of points using a spacing parameter m.

chladni_figures, a MATLAB code which creates Chladni figures of the eigenmodes of a thin vibrating plate, by Martin Gander and Felix Kwok.

cross_chaos, a MATLAB code which creates a dot-plot of an elaborate cross by repeatedly applying a randomized linear transformation to a starting point.

dragon_chaos, a MATLAB code which creates a dot-plot of a dragon by repeatedly applying a randomized linear transformation to a starting point.

epicycloid, a MATLAB code which computes, plots and tabulates an epicycloid curve.

fern_chaos, a MATLAB code which displays the Barnsley fractal fern.

fibonacci_spiral, a MATLAB code which displays points on a Fibonacci spiral, suggesting the arrangement of seeds in a sunflower, for instance.

fractal_coastline, a MATLAB code which uses perturbed Bezier interpolation to create a fractal coastline from a crude outline of a state, country, island, or even any general closed polygonal curve.

gaussian_prime_spiral, a MATLAB code which computes a twisting spiral path along the Gaussian primes, and displays a plot of the total trajectory.

henon_orbit, a MATLAB code which computes the orbit of the Henon map for various sets of initial data.

hexagon_chaos, a MATLAB code which produces a fractal image inside a hexagon by repeatedly computing the barycenter of the triangle formed by the iteration point and a randomly chosen side of the hexagon.

hilbert_curve, a MATLAB code which computes the sequence of discrete Hilbert curves whose limit is a space-filling curve.

julia_set, a MATLAB code which computes and plots a Julia set, the set of points in the complex plane that remain bounded under a mapping of the form f(z) = z^2+c.

leaf_chaos, a MATLAB code which creates a dot-plot of a leaf by repeatedly applying a randomized linear transformation to a starting point.

levy_dragon_chaos, a MATLAB code which creates a dot-plot of the Levy dragon by repeatedly applying a randomized linear transformation to a starting point.

lissajous, a MATLAB code which displays a Lissajous figure, of the form x = sin ( a1 t + b1 ), y = sin ( a2 t + b2 ).

logistic_bifurcation, a MATLAB code which plots the bifurcation diagram for the logistic equation, by John D Cook.

mandelbrot, a MATLAB code which generates an image of the Mandelbrot fractal set;

mandelbrot_orbit, a MATLAB code which generates the sequence of Mandelbrot iterates arising from a single starting point.

menger_sponge_chaos, a MATLAB code which creates a dot-plot of the 3D Menger sponge by repeatedly applying a randomized linear transformation to a starting point.

prime_plot, a MATLAB code which displays a box plot of the prime and composite numbers.

sierpinski_carpet_chaos, a MATLAB code which creates a dot-plot of the Sierpinski carpet by repeatedly applying a randomized linear transformation to a starting point.

sierpinski_triangle_chaos, a MATLAB code which creates a dot-plot of the Sierpinski triangle by repeatedly applying a randomized linear transformation to a starting point.

tree_chaos, a MATLAB code which creates a dot-plot of a tree by repeatedly applying a randomized linear transformation to a starting point.

ulam_spiral, a MATLAB code which displays the integers as a spiral of grid cells, with the primes highlighted, so show that they tend to fall along diagonals, as discovered by Stanislaw Ulam.


Last revised on 22 April 2026.