
Simulations & Coding Projects
Here, you’ll find a bit of a passion project of mine: a collection of interactive simulations and applets that I’ve made to demonstrate concepts that I find interesting. I’m always looking for new simulation ideas and coding challenges, so feel free to contact me if you have any. Disclaimer: most of these won’t work properly on mobile devices.
This is easily my favourite way to calculate the digits of π. It’s simple, elegant, mysterious, and hilariously inefficient.
Ever wonder why physics courses place such an emphasis on springs? Well, it turns out a lot of things can be modelled as springs. Some might even say everything is springs. Except the things that aren’t springs. Anyway enjoy these springs.
What does a system of springs have in common with a projectile flying through the air? The answer lies in whatever corner of your mind you store the math you learned in tenth grade.
Why is it that we can predict exactly where Mars will be in ten thousand years, but we can’t predict what the weather will be two weeks from now? Some systems are inherently chaotic, and perhaps the simplest example is the double pendulum.
As it turns out, some pretty pictures can arise from chaos. Some are even reminiscent of human anatomy.
Consider a particle that’s had a few too many drinks. If it moves completely randomly, does it ever get anywhere? The answer is: probably.
Consider A LOT of particles that have had a few too many drinks. While the motion of any one particle is unpredictable, can we say anything about the motion of the population as a whole?
Here, we take a look at how complex and beautiful structures (such as the shape of a lightning bolt) can emerge from random motion.
Calculate π by randomly dropping toothpicks on the floor.
Light and sound are travelling waves, which means the equations that describe them depend on both position and time. For that reason, they can be tricky to grasp. Hopefully this interactive animation improves your intuition.
Something strange happens when you listen to two slightly different musical notes at the same time.

The guy who made Flappy Bird removed it from the app store, so I made it myself. Need I say more?
Why are windows transparent when viewed head-on, but reflective when viewed at a glancing angle? It’s to do with a property of light known as polarization.
Ever wondered how glasses work? Lenses bend light to produce an image of an object at a new location, and in doing-so can correct certain vision abnormalities.
Sometimes you want something not to be truly random but instead, only sort of random. Perlin noise is a type of correlated noise that makes for nice smooth textures and pseudorandom trajectories. Check out this dumb game I made.
Ever wished you could see electric fields in all their rainbow-colored glory? You’re in luck!