No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Galton Box Simulator

This is a sketch made with Processing and the PBox2D physics library.

It is a simulation of the Beam Machine by sir. Francis Galton (a.k.a. Galton box).

You can see the sketch in action in this video!

The sketch has been designed with a procedural architecture in mind; what does it mean is that you can modify the geometrical structure of the Bean Machine easily simply by changing some global variables, and the code will adjust itself automatically.


In order to use the code you need:

  • to have your Processing IDE up and running (look here on how to set-up the Processing environment);
  • install the PBox2D library (for more information on how to install a library for your Processing environment, please visit this link);
  • Download the code from this repository, open it with your Processing IDE and run it!


This is a sort of migrated repository from its original location at The code has been updated and some documentation added.