Physics simulation: DLA
Diffusion-limited aggregation (DLA) is a model of how randomly walking particles stick together into branching clusters. It shows up in physics, materials science, and graphics.
Problem
I needed a clear, repeatable DLA sim for coursework or demos: correct random-walk and sticking rules, but still fast enough to finish on ordinary hardware.
Solution
Classic algorithm on a 2D lattice (or a continuous variant): seed a cluster, release walkers from a boundary, and freeze them on first contact. Render growth frame by frame or as a final aggregate.
Impact
- Makes nonlinear growth and fractal-looking structures easy to show in class or demos.
- Gives a baseline for comparing parameters (stick probability, lattice vs off-lattice, noise).
Lessons learned
- Visualize early. Neighbor-check bugs show up immediately on screen.
- Where new walkers spawn changes both runtime and cluster shape a lot.
- For big clusters, move to sparse maps or distance fields before just adding more particles.
Tech stack
- Language and viz tools used for the assignment or demo build
- Optional: numeric libraries for offline analysis of cluster stats