The Spudguy's Simulations

A variety of interactive simulations running on the GPU

Particle-based Simulations

N-body Gravity Simulation

This is a simulation of an arbitrary number of gravitational bodies interacting with each other in interesting and chaotic ways. Here you will see a screenshot of the simulation in action, simulating nearly 100,000 particles at once.
It works by sending particle data to the gpu through a texture buffer for parallel processing, which is much faster than simply writing a for-loop to consecutively go through each and calculate each particle interaction. So far, this is my most efficient "real-time" gravity simulation.

Particle Life

By following unique sets of mutual rules, the differently colored particles behave in very interesting ways. The behaviors that arise from this simple rules can be described as emergent life, creating cells and little creatures. Currently not GPU-bound.

Softbody Simulation

A spring-mass model for a softbody (basically fancy jello).

Cellular Simulations

Conway's Game of Life

John Conway's famous "Game of Life" implemented with WebGPU. This one may not be supported for all browsers, so I highly recommend checking out my other simulations until it is! John Conway's Game of Life is not a game, but rather a concept developed by John Conway, an early computer scientist. The idea is that each cell is either "alive" or "dead", and then each cell dies or revives based on the state of the cells around it. If there are too many cells, it will die, If there are not enough cells, it will die, and if there are just the right number of cells around it, it will stay alive or come alive.

These rules are simple, but complex behaviors can arise from them. This is called "emergent life," and it is the main reason why this simple simulation is one of the most popularized computer science concepts.