Galton Box Simulator

Here’s one of our first experiment with a physics library: we used the Box2D library for Processing to recreate a physics simulation.

Taking inspiration from the work of Sir Francis Galton, and thanks to what we have learned from “The Nature of Code” book from Daniel Shiffman, we have recreated the Bean Machine in code!

If you don’t know what a Bean Machine is, take a look at this Wikipedia page!

Honestly we created this sketch also to see if the balls would have been arranged in a normal distribution way :P


You can download the source code from our GitHub page.

If you find this article useful and you like it, please leave a comment below: let us know what do you think about it, we'd really appreciate it. Thank you very much and, as always, stay tuned for more to come!