Moonraker

Chasing the moon, flying over the surface with high speed. I love the ray marching method for creating incredible graphics. No mesh or texture is used, the whole program is made in the fragment shader. Click on the image to run the simulation. Fly over the surface of the moon. Run Full Screen Ray…


Phyllotaxis

Tonight I was reading some interesting publications about math in nature. I was drawn to the phenomena of Phyllotaxis. The beautiful and dense arrangement of leaves in nature is stunning to see. The text below is cited from the free book "the algorithmic beauty of plants", available on the website…


game-of-life

A C++ exercise in function pointers and concurrency

Game of Life This program shows the well known Game of Life. I've chosen this simulation as an exercise to explore: Member function pointers as argument Problem domain slicing concurrency, using all available cpu cores, without creating and destroying thread objects after each iteration. Game of…


Diffusion-Reaction, creating animal patterns

I while ago, I stumbled upon a famous paper of Alan Turing called The chemical basis of morphogenesis. It is fascinating to see the idea of using diffusion - reaction equations to simulate the creation of animal patterns. In his paper, he describes his idea to use two non-uniform…


Bouncing balls

Pixels meet physics! What to code when you have an hour sitting in the train, or don't want to waste your evening watching  tv? Let's try a quick and simple simulation, where raw pixels come to live and react like they obey the laws of physics. Enjoy this simulation of bouncing…