← projects

Particle Simulator

Full-stack desktop app — A 2D particle physics simulation with real-time rendering, gravity, and springs.

Java · Spring Boot · JavaFX · MongoDB · Docker

Problem

A physics sandbox is only useful if you can change it while it runs, and a long-running experiment is only useful if losing the window does not lose the work.

Solution

A JavaFX front end over a Dyn4j engine with live-editable parameters, backed by a Spring Boot service that snapshots experiment state to MongoDB on a background scheduler so the simulation loop never blocks on a write.

Overview

A 2D particle physics simulation built with Spring Boot and JavaFX. The physics engine uses Dyn4j for gravitational forces, collision detection, and spring constraints. Users can create, drag, and manipulate particles in real time with configurable physics parameters, pause/resume controls, and preset scenarios. The backend persists experiments to MongoDB with auto-save snapshots every 5 seconds via a parallel ScheduledExecutorService, fully containerized with Docker and Colima.

Impact

  • Auto-save snapshots every 5 seconds on a parallel ScheduledExecutorService.