Alex's Leafpub

My side projects and blog posts

Double pendulums with WebGPU

I made a website that runs an interactive simulation of thousands of double pendulums. It uses WebGPU to simulate each pendulum in parallel. On my MacBook Pro M2 in Chrome it runs at 70 FPS and 5000 simulation ticks per second on battery power, without any meaningful simulation energy loss. WebGPU is still a relatively new API that works best in Chrome, but more browsers are starting to add support for it.

August 28, 2025

1