Skip to content
All projects

3D SHM Visualization

A 3D simple harmonic motion visualizer built with p5.js and WebGL — springs, pendulums and phase relationships you can orbit around.

p5.js WebGL physics

Built with: p5.js · WebGL · JavaScript

Simple harmonic motion is usually taught with flat, static diagrams. This project puts SHM in 3D space — you can orbit the camera around an oscillating system and actually see how circular motion projects into sinusoidal motion.

The visualizer in motion

Features

  1. A 3D spring-mass system rendered in real time
  2. Camera orbit controls to inspect the motion from any angle
  3. Live trace of displacement against time, drawn alongside the moving body

It started as a study aid for my physics class and ended up being one of my favorite things to stare at.