Interactive 2D Physics Engine

Authors

Amy Liu ’26

Stephen Xu ’27

Abstract

In our project, we have created an interactive 2D physics engine that simulates the motion of small (sand-like) particles represented by pixels in an Earth-like gravity environment. The system uses a 64x64 LED matrix screen to display the simulation and an accelerometer to detect the device’s orientation. The particle behaves as if in a box-like 2D world with boundaries and moves similar to sand falling under gravity. We treat each particle individually as if it were its automata. The user interacts by rotating around the boundaries of the LED screen to visualize the dynamic change in particle motion. We used the FPGA to drive the physics engine, simulated gravitational pull, and collisions and utilized the MCU to handle input from the accelerometer. We use SPI as the communication protocol between the MCU and FPGA to transfer data and I2C protocols to interface the MCU and an accelerometer.

Video

Block Diagram

Below is a high level block diagram overview of our full system

Block Diagram with MCU and Display

Table of contents

MCU Design MCU functions Explanation: I2C protocols and SPI protocols

FPGA Design Display driver and Physics Engine Explanation

Results Important Results of our Project. Also includes pictures and media of our build process.

Documentation Valuable Documentation: General schematics, the BOM, and references.

Team Team members self introduction