Watch DLA (Diffusion-Limited Aggregation) grow fractal dendritic crystals and snowflakes. Particles are colored by capture time. Fractal dimension estimated in real time.
What exactly is happening in this simulator? I see particles randomly walking and sticking to a central cluster, forming these weird, branchy shapes.
🎓
Basically, you're watching a classic physics model called Diffusion-Limited Aggregation, or DLA. A "seed" particle is fixed in the center. Then, other particles perform a random walk—like they're diffusing through a liquid—until they touch the cluster and stick. The randomness creates those beautiful, fractal, snowflake-like arms. Try running the simulation a few times; you'll never get the same crystal twice!
🙋
Wait, really? The shape depends on randomness? But the "Sticking Probability" slider isn't at 100%. What happens if I lower it?
🎓
Great observation! In practice, a 100% stick means a particle attaches on first contact, which tends to create denser outer fringes. Lowering the probability—say to 50%—lets the walker "bounce off" and wander deeper into the gaps between branches. This often creates a denser, more filled-in core. Play with that slider and watch how the internal structure of the crystal changes.
🙋
And the "Fractal Dimension" it calculates? It's never a nice round number like 2. What does ~1.7 actually mean?
🎓
In plain language, it quantifies how efficiently the cluster fills space. A solid disk has dimension 2. A simple line has dimension 1. A DLA cluster's theoretical fractal dimension is about 1.71. This means its mass doesn't scale with the area (radius^2) but with radius^1.71—it's sparser. If you increase the "Walkers per Step" to grow a bigger cluster faster, you can watch the estimated dimension stabilize near that value.
Physical Model & Key Equations
The core of the simulation is the random walk of each particle, which models diffusion. The particle's position is updated step-by-step with no preferred direction.
Here, $\vec{r}$ is the particle's position, $\delta$ is the step length (often 1 pixel), and $\theta$ is a random angle chosen uniformly between $0$ and $2\pi$ at each step. This creates the "drunken walk" you see on screen.
The fractal dimension $D_f$ is estimated using the radius-of-gyration method. As the cluster grows, we measure how its mass $M$ scales with its characteristic size $R_g$.
$$ M \propto R_g^{\,D_f} $$
Here, $M$ is the number of particles in the cluster, and $R_g$ is the root-mean-square distance of particles from the cluster's center of mass. A plot of $\log(M)$ vs $\log(R_g)$ gives a slope of $D_f$. This is the number the simulator estimates and displays.
Frequently Asked Questions
The color of particles represents the time they were captured (growth stage). Particles that adhere earlier appear bluer, while those that adhere later appear redder. This allows you to visually confirm the order in which the crystal grew, providing an intuitive understanding of the time evolution of dendritic structures.
The fractal dimension indicates the complexity of the structure. For 2D DLA, the theoretical value is typically around 1.71. A larger value means a denser structure, while a smaller value indicates finer branching. If the real-time displayed value falls within the range of 1.5 to 1.8, it indicates normal DLA growth.
In a square lattice, angular dendritic crystals with cross symmetry are generated, while in a hexagonal lattice, shapes closer to hexagonal snowflakes are produced. Due to differences in coordination number (number of adjacent sites), the anisotropy of growth direction changes, and slight differences also appear in the fractal dimension.
You can reduce the computational load by decreasing the number of particles or reducing the lattice size. Additionally, setting a longer display update interval can lighten the rendering process. As a guideline, the simulation runs smoothly up to about 10,000 particles, but beyond that, please adjust gradually.
Real-World Applications
Electrodeposition & Battery Technology: When charging a lithium-ion battery, lithium metal can deposit on the electrodes in dendritic, DLA-like structures. These branches can short-circuit the battery, making DLA simulations crucial for understanding and preventing this dangerous failure mode.
Mineral & Snowflake Formation: The intricate patterns of ice crystals growing from water vapor, or minerals precipitating from a solution, are often governed by diffusion-limited processes. The simulator's branchy shapes mimic how real snowflakes and certain mineral deposits form in nature.
Porous Material & Filter Design: The structure of materials like activated carbon filters or bone tissue can resemble DLA clusters. Simulating their growth helps engineers design materials with optimal surface area and porosity for filtration or medical implants.
Dielectric Breakdown & Lightning: The path of a lightning bolt or an electrical spark through an insulating material follows a fractal pattern similar to DLA. The model helps physicists study how these unpredictable, branching discharges propagate.
Common Misconceptions and Points to Note
When you start using this simulator, there are a few points that are easy to misunderstand, so let's cover them first. You might tend to think that increasing the number of particles makes the simulation closer to a real crystal, but it's not that simple. While more particles do create a finer structure, if the lattice size for calculation is insufficient, the cluster will hit the screen edges and its growth will become distorted. For instance, generating 100,000 particles on a 1000x1000 lattice will make edge effects non-negligible. The trick is to first increase the lattice size and then increase the particle count.
Next, the interpretation of the "Sticking Probability" parameter. While lowering it is described as "increasing bounces," remember this is an abstracted model that "probabilistically decides whether a particle sticks." In real-world phenomena, like electrodeposition, this corresponds to factors like the energy barrier at the interface or the influence of additives. So, understand that setting it to "0.1" doesn't mean the real-world probability is 10%; it's a parameter for observing relative trends.
Finally, how to read the fractal dimension value. You might see the value fluctuate between 1.5 and 1.8 during simulation and wonder, "Is the calculation wrong?" This is normal. In the early growth stages where few data points (cluster radius and mass) are used for estimation, the value is unstable. It converges toward the theoretical value of approximately 1.71 as the particle count increases. Therefore, refer to the value after growth has progressed somewhat (e.g., after the particle count exceeds 5000).
Set particle size (valPSizeNum, range 1–10 px) using slPSize slider to control individual particle radius in the DLA aggregate.
Adjust stickiness coefficient (valStickNum, 0.5–1.0) with slStick to modify adhesion probability when particles contact the growing cluster.
Define maximum particle count (valMaxPNum, 1000–50000) via slMaxP to control simulation duration and final fractal structure density.
Configure batch size (valBatchNum, 10–500) using slBatch to set particles released per iteration; larger batches accelerate growth but reduce geometric refinement.
Click Start to initiate diffusion-limited aggregation; the simulator renders dendritic patterns and computes fractal dimension D from the final cluster.
Worked Example
A copper electrodeposition study uses particle size=2 px, stickiness=0.85, max particles=15000, batch=50 per cycle. The DLA simulation produces a dendritic snowflake pattern with measured fractal dimension D≈1.68 (typical for 2D copper electroplating). Run time is approximately 8 seconds. Increasing stickiness to 0.95 yields denser, more compact clusters (D≈1.52); decreasing to 0.70 produces sparse, branching fractals (D≈1.82), matching experimental diffusion-limited growth in galvanic systems.
Practical Notes
Stickiness below 0.6 creates unrealistic sparse structures; industrial DLA simulations typically use 0.75–0.90 for mineral precipitation and frost formation.
Particle size 3–5 px balances computational speed with visual fractal detail; sizes above 8 px flatten the dendritic character.
For batch sizes above 200, monitor cluster stability near simulation boundaries to avoid artificial edge effects in fractal dimension estimation.
Export final cluster as PNG for image analysis in ImageJ or MATLAB to validate box-counting fractal dimensions independently.