Galton Board Explorer

Live Script simulating a particle falling through a lattice of polygonal objects.
12 Downloads
Updated 30 Mar 2025

View License

A ball falling chaotically through a lattice of fixed round pegs (a Galton board) is a canonical demonstration of randomness and the central limit theorem. The distribution of the locations at the bottom of the board is usually modeled by compounding binomial distributions representing the ball going to either side of a peg after each collision. The central limit theorem ensures the resulting distribution approaches a normal distribution. The road to chaos in a real Galton board is more complex and parameter-dependent [1-4].
This educational Live Script simulates point-like objects in two-dimensional ballistic motion scattering from a Bravais lattice of fixed regular n-sided polygons. The polygon type and radius, the lattice structure, the lattice and polygon orientations, and the collision coefficient of restitution may be varied to investigate biased choices, trapping and reflection, and other behaviors.
This script may interest students and instructors of physics and other fields. 'Try this' suggestions, coding and other 'Challenges', hyperlinks, and references are included for further exploration. Related STEM educational Live Scripts by the author are available[5].

Cite As

Duncan Carlsmith (2025). Galton Board Explorer (https://uk.mathworks.com/matlabcentral/fileexchange/180444-galton-board-explorer), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.5

minor

1.0.4

Added further analysis and miscellaneous improvements.

1.0.3

Small improvements.

1.0.2

minor

1.0.1

spelling!

1.0.0