b2KIT

Chaos Game Visualizer

Play the chaos game with polygons and ratio rules. Watch Sierpinski triangle, fern, and custom attractors emerge from random iterations.

Tested tool guide Tested browser tools Checked August 16, 2026

What Chaos Game Visualizer does and how it behaves

Random choices can settle into a sharply structured set. The Chaos Game Visualizer starts from a point, repeatedly selects among polygon targets or preset rules, moves the point by the chosen ratio, and plots the resulting orbit. It supports experiments with the Sierpinski triangle, fern, and custom attractors as iterations accumulate. The usual surprise is that randomness controls the route rather than the overall limiting geometry: separate runs need not contain identical points, yet they can reveal the same recognizable attractor.

How the result is produced

1

Polygon iteration

For a polygon rule, each iteration randomly chooses an eligible vertex and places the next point on the segment from the current point toward that vertex. A ratio of 0.5 places it halfway. The new location becomes the current point for the following iteration, so the plotted dots form one dependent orbit, not a collection of independent samples.

2

Attractor formation

At the start, the orbit can retain a visible trace of its initial point. Under contracting rules, that influence shrinks and later points gather on the rule set's attractor. For the three-vertex triangle rule with equal random choice and a 0.5 move, repeated points fill out the Sierpinski gasket. The fern preset and custom configurations use different rule sets, so their limiting shapes and densities can differ.

Good uses

  • Demonstrating how repeated halfway moves toward randomly selected triangle vertices produce the nested gaps of the Sierpinski gasket.
  • Testing how changing a custom polygon or movement ratio alters an attractor's symmetry, overlap, clustering, and empty regions.
  • Comparing the fern and Sierpinski presets with custom chaos-game rules to distinguish a persistent attractor from short-lived random scatter.

Limits and checks

  • A finite run is only a sampled picture of an attractor. Small blank patches may disappear after more iterations, while persistent large gaps are stronger evidence of the set's structure.
  • Point density records how often the random orbit visits an area as well as where the attractor exists. A darker region is not necessarily a geometrically thicker part of the fractal.
  • One polygon and one constant ratio cannot describe every iterated-function-system fractal. A standard fern uses several distinct affine contractions, so its preset should not be interpreted as an ordinary polygon halfway rule.

Common questions

Why does a random triangle process leave regular holes?

With a 0.5 move, each triangle vertex maps points into the smaller corner triangle nearest that vertex. None of those three mapped regions covers the central inverted triangle. Repeating the same choice-and-move process creates corresponding uncovered regions at progressively smaller scales, while the random choices determine which surviving regions the orbit visits and in what order.

Will the same settings produce exactly the same picture twice?

Generally, no. Random vertex or rule choices change the exact point sequence between runs. For a contracting rule set, sufficiently long runs should reveal the same large-scale attractor and broadly similar density, but individual coordinates, local clusters, and temporary gaps can differ. The visualization therefore supports structural comparison, not exact point-for-point reproduction.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools