Examples#

This gallery walks through every public feature of mathematicskit.fractals_chaos: Lyapunov exponent estimation, box-counting fractal dimension, Mandelbrot/ Julia set generation, iterated function systems, and cellular automata.

See also the narrative tutorial:

Each script in this gallery is self-contained and can be run directly with python examples/fractals_chaos/<section>/<script>.py.

Sections#

  • lyapunov – Lyapunov exponent estimation for 1D maps and flows.

  • box_counting – fractal (box-counting) dimension estimation.

  • mandelbrot_julia – Mandelbrot and Julia set escape-time generation.

  • ifs – iterated function systems: the Barnsley fern and Sierpinski triangle/carpet.

  • cellular_automata – elementary (Wolfram rule) cellular automata and Conway’s Game of Life.

Box-counting dimension#

Estimating fractal dimension from a point cloud via box-counting.

Box-counting dimension of the Sierpinski triangle

Box-counting dimension of the Sierpinski triangle

Cantor’s middle-thirds set and its dimension

Cantor's middle-thirds set and its dimension

Cellular automata#

Elementary 1D cellular automata (Wolfram rule numbering) and Conway’s Game of Life.

Elementary cellular automata and Conway’s Game of Life

Elementary cellular automata and Conway's Game of Life

Fractal curves#

Nowhere-differentiable and space-filling curves, coastline measurement, and the similarity dimension.

The Weierstrass function: continuous, nowhere differentiable

The Weierstrass function: continuous, nowhere differentiable

Hilbert’s space-filling curve

Hilbert's space-filling curve

The Koch snowflake: infinite perimeter, finite area

The Koch snowflake: infinite perimeter, finite area

How long is the coast of Britain? The divider method

How long is the coast of Britain? The divider method

Hausdorff and Moran: the similarity dimension

Hausdorff and Moran: the similarity dimension

Peano’s space-filling curve

Peano's space-filling curve

Aggregation#

Diffusion-limited aggregation: fractal clusters grown by random walkers.

Diffusion-limited aggregation

Diffusion-limited aggregation

Iterated function systems#

The chaos game: Barnsley’s fern and the Sierpinski triangle/carpet.

Sierpiński’s triangle and carpet

Sierpiński's triangle and carpet

Barnsley’s fern: an iterated function system

Barnsley's fern: an iterated function system

Lindenmayer systems#

Parallel string rewriting and turtle graphics for plants and fractal curves.

Lindenmayer systems: from algae to plants

Lindenmayer systems: from algae to plants

Lyapunov exponents#

Estimating the Lyapunov exponent of 1D maps and simple flows.

Lyapunov exponent across the logistic map’s route to chaos

Lyapunov exponent across the logistic map's route to chaos

Mandelbrot and Julia sets#

Escape-time generation of the Mandelbrot set and Julia sets.

Fatou and Julia: Julia sets of z -> z^2 + c

Fatou and Julia: Julia sets of z -> z^2 + c

The Mandelbrot set

The Mandelbrot set

Discrete maps#

Two-dimensional maps with strange attractors.

The Hénon attractor

The Hénon attractor

Gallery generated by Sphinx-Gallery