Crystal & Lightning Growth

Grow frost, coral and dendrites by diffusion-limited aggregation — or branching lightning bolts.

Joined the crystalfirstlast
100%

Drag to draw seed crystal and the walkers grow branches from your lines; Rerun grows again from step 0 with what you drew. Random walkers wander until they touch the crystal and stick, so branches shield the gaps between them.

Setup

How is Crystal & Lightning Growth working for you?

About Crystal & Lightning Growth

Good for: Short breaks

Crystal & Lightning Growth grows the branching shapes found in frost on windows, mineral dendrites, coral, electrodeposits and lightning, using two classic models from physics. Diffusion-limited aggregation (DLA), introduced by Thomas Witten and Leonard Sander in 1981, releases random walkers that wander until they touch the growing cluster and stick. Tips stick out further and catch more walkers than the hollows between them, so every bump grows into a branch and the result is a feathery fractal with a dimension of about 1.7.

Choose Coral to grow from a single seed, Frost to grow from scattered nucleation points across a pane, or Deposit to grow upward from a base as particles drift down — like copper electrodeposition or manganese dendrites on rock. Stickiness makes the crystal denser when lowered (walkers can bounce off and slip into gaps), drift biases the walk, and cells are colored by the order they joined, so you can read the growth history in the colors.

Lightning mode uses the dielectric breakdown model of Lucien Niemeyer, Luciano Pietronero and Hans Wiesmann (1984). The electric potential between the charged cloud and the ground is solved across the grid, and the discharge grows one step at a time into a neighboring cell picked with a probability that rises with the local field. Branchiness changes how strongly the field steers it. When a branch reaches the ground, the path back to the cloud is drawn as the main channel, the route a return stroke takes after a stepped leader; press the canvas for a new bolt.

How to use Crystal & Lightning Growth

  1. Pick a scene. Coral grows from one seed in the center, Frost from scattered seeds, Deposit upward from the bottom edge, and Lightning grows a discharge from the sky toward the ground.
  2. Watch it grow. Press Play; raise Speed for more walker moves (or channel cells) per second. Show walkers draws the particles still wandering.
  3. Measure the dimension. In Coral the chart plots the particles within each distance of the seed against that distance on log-log axes. The slope of the line fitted beyond 5 cells is the cluster's fractal dimension; no exact formula gives it. Witten and Sander's walkers, released one at a time, give about 1.7; this tool releases hundreds at once so a cluster grows in seconds, which packs the core and thins the outer branches, so its fit is lower and changes with the grid size. The run log records each finished run's particles and dimension.
  4. Draw on the canvas. Drag to draw seed crystal: walkers stick to your lines, so new branches grow from them. In Lightning mode, drag to build lightning rods; they are grounded, so the discharge bends toward them and strikes them. Rerun grows again from t = 0 with the lines or rods you drew; Restart clears them and starts the mode again; Reset also returns every setting to its default.
  5. Shape the crystal. Lower Stickiness for denser, more compact growth; raise Drift to push walkers toward the seed (Coral), downward (Deposit) or sideways (Frost).
  6. Color by age. Each cell is colored by when it joined the cluster. Pick a color map and background to style the result.
  7. Lightning. Branchiness controls how strongly the electric field picks the direction of growth: low values make bushy discharges, high values make bolts that dive straight for the ground. Once the bolt strikes, press the canvas for a new one.
  8. Export. Download a PNG up to 4000 px or record a short video or GIF of the growth. Record full run grows the same crystal again from the start and records it until it is complete (or the lightning strikes). The CSV files hold the growth over time and the run log.

Frequently asked questions

What is diffusion-limited aggregation?

It is a growth process in which particles move by random walk (diffusion) and stick when they touch a cluster. Because the outer tips are much more likely to be reached than the shielded gaps, the cluster branches again and again. DLA patterns appear in mineral dendrites, electrodeposition, bacterial colonies and viscous fingering.

Why do snowflakes and frost branch?

Ice grows from water vapor diffusing through air. Corners and tips stick out into air with more vapor, so they grow faster than flat faces — the same instability that drives DLA. Real snowflakes add six-fold crystal symmetry from the ice lattice; try Snowflake Maker for that.

How is lightning simulated?

The dielectric breakdown model treats the channel as a conductor at the cloud's potential and the ground as the opposite electrode. It solves Laplace's equation for the electric potential across the grid, then extends the channel into a neighboring cell with probability proportional to the field there raised to a power. That produces the branching, tortuous paths seen in lightning and in Lichtenberg figures.

What does the fractal dimension mean?

A straight line has dimension 1 and a filled area has dimension 2. A DLA cluster sits in between: doubling its radius multiplies the number of particles by about 2^1.7, so it is denser than a line but full of holes. That in-between dimension is what makes it a fractal.

Can I leave it running at night?

Yes. Choose Crystal mode and lower Speed, and the crystal grows slowly from its seed toward the edge of the grid. Press Full screen and lower the screen brightness; it makes no sound.