Results


Animation Display

Our final system successfully demonstrated two interactive mathematical simulations—Conway's Game of Life and the Mandelbrot Set—rendered in real time on a VGA display powered by the Raspberry Pi Pico (RP2040). At startup, the system displays a menu interface that allows users to navigate between simulation modes using GPIO buttons. The menu highlights the currently selected option and provides a clear, accessible way to switch between Conway and Mandelbrot simulations. Once a mode is selected, the VGA display transitions to the corresponding visualization, where users can interact with the simulation in real time using additional controls. The system combined smooth graphics, responsive inputs, and integrated audio feedback to create a rich, multi-sensory experience.

Figure 1: Main Menu

In Conway's Game of Life, we implemented a dynamic, animated grid that evolves based on the classic cellular automaton rules. The VGA screen was divided into two sections: the left side displayed the evolving cell grid, while the right side showed the simulation title. Users interacted with the simulation through GPIO push buttons, using a yellow cursor to mark additional live cells on the grid. The cursor movement featured acceleration logic—repeated presses in the same direction increased movement speed, while switching directions reset the acceleration. This enhanced the user experience by making navigation intuitive and efficient.

Two initialization modes were available: a pre-defined “π”-shaped pattern and a randomly generated grid. Both modes produced complex, emergent behaviors that matched theoretical expectations. The simulation maintained a consistent update rate with no visible flicker or lag, ensuring smooth animation throughout execution.

We also integrated an audio feedback mechanism into the Game of Life simulation. During each update cycle, a synthesized tone was generated, with its peak frequency proportional to the number of live cells. This created a responsive auditory representation of the system’s activity: dense, highly populated grids produced higher-pitched tones, while sparser ones resulted in lower frequencies. The audio synthesis used Direct Digital Synthesis (DDS) with fixed-point sine wave generation and smooth amplitude modulation, yielding clean, harmonic sound output.

Figure 1
Figure 2
Figure 2: Animation of Conway's game of life in mode Pi (left) and random (right).
Figure 1
Figure 2
Figure 3: Display before (left) and after (right) updating alive cell and random.

In the Mandelbrot Set visualization, we rendered the fractal using floating-point arithmetic to compute escape-time iterations for each pixel in the complex plane. A magenta zoom box allowed users to select and magnify specific regions of interest. This box could be repositioned and resized interactively via directional buttons and a potentiometer. Like the Game of Life cursor, the Mandelbrot zoom box also incorporated acceleration logic for efficient navigation.

After each zoom action, the fractal was recalculated and redrawn with updated coordinate bounds. Rendering was accurate and visually detailed through several layers of zoom. However, due to limited RAM on the RP2040, the system encountered a memory overflow around the 8th zoom level. This was caused by the accumulation of zoom box overlays without screen clearing, as the framebuffer memory was nearly exhausted. Despite this limitation, the visual output remained correct and compelling up to that point.

To complement the fractal visuals, the Mandelbrot module featured a looped ambient audio effect designed to evoke an astronomical or “spacey” atmosphere. A cycle of predefined frequencies was played at regular intervals using the same DDS technique as in Conway's Game of Life. The effect provided a soothing background soundtrack that enhanced the experience of exploring deep regions of the Mandelbrot set.

Figure 1
Figure 2
Figure 4: Mandelbrot Plot before (left) and after (right) zoom in.
Figure 5: Break out figure after zoom in 8 times.
Figure 6: Issue of updating the zoom in screen.

Speed of Execution

The system delivered excellent performance in terms of responsiveness and real-time behavior. In Conway's Game of Life, the grid updated smoothly at approximately 1-millisecond intervals using PT_YIELD_usec(1000), resulting in fluid animation without any visible hesitation or flickering. The VGA output remained stable throughout, with each generation transition rendered cleanly.

In the Mandelbrot Set module, full-screen fractal recalculations after zoom actions introduced brief delays (typically 3-6 seconds), which is expected given the computational load. User interactions—including cursor navigation, zoom box manipulation, and button presses—were highly responsive. Concurrent execution of tasks such as video rendering, input handling, and audio playback was achieved through lightweight protothreads, ensuring smooth multitasking without blocking or performance degradation.

Safety Enforcement

Safety was a core consideration in both hardware and software design. All GPIO pins operated at 3.3V logic levels, and VGA outputs were protected using 330Ω and 470Ω resistors to limit current and prevent overdriving the display. The audio DAC output was voltage-limited and properly biased to remain within safe operating ranges.

Each GPIO was explicitly initialized and configured using gpio_init() and gpio_set_dir() to prevent floating inputs or misconfiguration. Input buttons were debounced using carefully designed finite state machines (FSMs), which eliminated spurious triggering and ensured stable interaction. SPI communication to the DAC was performed at safe baud rates with hardware buffer usage, minimizing any risk of data collision. No hazardous components or high-current elements were used, making the system safe for classroom, lab, or outreach use.

Usability

The system was designed for intuitive and accessible interaction. At startup, a clearly presented menu allowed users to select between Conway's Game of Life and the Mandelbrot Set using simple button inputs. The currently selected option was highlighted for clarity, and transitions between modes were seamless.

During simulation, directional buttons controlled either a yellow cursor (for Conway) or a zoom box (for Mandelbrot), with acceleration logic enabling both fine and rapid navigation. A potentiometer provided smooth, analog adjustment of zoom size in the Mandelbrot viewer. Text and graphical elements were rendered with high contrast and large fonts for readability, and sound effects provided real-time auditory feedback that enhanced the interactive experience. The system was tested by multiple users and found to be easy to operate, responsive, and engaging, making it suitable for a wide range of educational and demonstrative contexts.