Inspired by the Galton board demonstration from Lab 2—which elegantly visualized the normal distribution through physical randomness—we were motivated to explore additional mathematical ideas through digital simulation. The Galton board made probabilistic behavior both intuitive and visually compelling, highlighting how abstract mathematical principles can come to life when presented in a dynamic and interactive format. This lab left a lasting impression and became a foundational influence in shaping our final project.
Building on this inspiration, we aimed to apply the same “show rather than tell” philosophy to other abstract domains, such as fractals and emergent systems. We also drew from the open-source VGA and audio libraries, which demonstrated how the Raspberry Pi Pico could generate real-time graphics and sound using low-cost hardware. These resources provided a strong technical foundation and encouraged us to build a unified, modular platform that could simulate multiple mathematical models. By integrating visual computation, user interaction, and audio feedback, our goal was to create a compelling educational tool for classroom learning and personal exploration.
Conway's Game of Life is a cellular automaton devised by British mathematician John Horton Conway in 1970. It is a zero-player game that evolves over time based on a set of simple rules applied to a two-dimensional grid of cells. Each cell can be in one of two states: alive or dead. The next state of each cell is determined by the states of its eight immediate neighbors, following three fundamental rules: (1) a live cell with fewer than two live neighbors dies due to underpopulation; (2) a live cell with two or three live neighbors survives; and (3) a dead cell with exactly three live neighbors becomes alive due to reproduction.
Despite its simplicity, the Game of Life exhibits a wide range of complex and emergent behaviors, including oscillators, gliders, and self-replicating patterns. It has been widely studied in the fields of mathematics, computer science, and complex systems as a model for emergent computation and decentralized behavior. The Game of Life is particularly well suited to digital simulation due to its discrete time steps and localized rule set, making it a popular choice for educational and artistic projects exploring algorithmic complexity.
The Mandelbrot set is one of the most well-known examples of mathematical fractals, named after French-American mathematician Benoît B. Mandelbrot, who studied and popularized it in the late 20th century. The set is defined in the complex plane and is generated by iterating the quadratic function Zn+1 = Zn2 + C, where Z0 = 0 and C is a complex number. A point C belongs to the Mandelbrot set if the sequence does not diverge to infinity, even after many iterations.
The boundary of the Mandelbrot set exhibits infinite complexity and self-similarity, with intricate and visually striking patterns revealed at every level of magnification. These patterns are not exactly repeated but resemble each other, a hallmark of fractal geometry. The Mandelbrot set has become a symbol of mathematical beauty and chaos theory, illustrating how simple iterative rules can produce infinitely complex structures. It is widely used in computer graphics, mathematical research, and educational demonstrations to explore the concepts of recursion, feedback, and complexity arising from simple equations.
The system is organized into a modular, multitasking architecture that separates rendering, input handling, simulation logic, and audio feedback across both cores of the RP2040.
On startup, the system displays a main menu offering three selectable simulations: Conway's Game of Life with a predefined "π" shape, Conway's Game of Life with random initialization, and a Mandelbrot Set visualizer. The user can cycle through the available options using the menu button, and confirm their selection using the confirm button.
Conway's Game of Life - π Mode: Initializes the grid with four stylized “π” shapes arranged on the screen. Users can interactively add live cells by moving a cursor over the display area using directional buttons. Pressing confirm places a new live cell, allowing for custom configuration before starting the simulation. The simulation updates grid states based on standard rules and evolves the pattern across generations. An audio tone is generated using DDS, with the tone’s amplitude dynamically modulated in proportion to the number of live cells, offering a real-time auditory representation of system activity.
Conway's Game of Life - Random Mode: Operates similarly to the π mode, but initializes the grid with a random distribution of live and dead cells. All other mechanics, including user interaction, rule updates, visual feedback, and audio modulation, remain the same.
Mandelbrot Set Viewer: Renders the classic fractal by applying escape-time iteration on a defined region of the complex plane. A zoom frame is drawn around the selected region, and users can reposition it using directional buttons. A potentiometer is used to adjust the frame size dynamically. Pressing confirm triggers a zoom-in effect by recalculating the region bounds and redrawing the fractal at a higher resolution, allowing for deep exploration of the Mandelbrot structure.
Working within the limited memory and processing constraints of the RP2040 was also a valuable learning experience. The chip's modest resources forced us to make careful architectural choices: we optimized our graphics rendering pipeline for speed and memory efficiency, split processing across both cores to balance user input and drawing tasks, and relied on fixed-point arithmetic to handle real-time audio generation through Direct Digital Synthesis.
These constraints aligned well with the learning objectives of the course—particularly understanding hardware/software tradeoffs—and pushed us to write more disciplined, efficient embedded code. Designing a complex yet responsive user interface under these limitations was both challenging and rewarding.
This project does not violate any existing patents, copyrights, or trademarks. We used open-source VGA and DDS libraries from Professor Hunter Adams with proper credit. All other code and logic were developed by our team. The simulations implemented are based on well-known, public-domain mathematical models.