Starting from today, the 19th of May (Wednesday), I will implement one algorithm per day, visual or other, and share the source code.
Spinning Cube. I couldn’t figure out how to make the box spin vertically so the result looks weird.
I started with one ball with simple acceleration and collision physics and then added more balls and wind. The hardest part was writing the collision resolution between balls, and I’m still not confident that it’s 100% right.
This started as an attempt to add attraction between the balls to the previous day’s sketch. Then I started experimenting with repulsion and alternating between the two. The behaviour became more and more complex as groups of balls and unattached singletons appeared. The end result reminded me of biological simulations, so I colored the balls green.
This is an experiment for a project involving cloth simulation. For this sketch I did the simplest thing possible: a simulation of a chain made up of little links. There are no feedback effects to take care of, and each element is only connected to its immediate neighbours.
First, I created a 2D wave simulation. Then I started adding interactivity and this slowly turned into a game. This is a 3D experiment, and there weren’t any problems except for making mouse interactions work with boxes. I had to add an external library to handle them.
I really like how this turned out, but the simulation is sometimes unstable. Instead of hard constraints, the sketch uses spring forces to mimic rubbery cloth. The simulation noise eventually builds up.
Simple sketch this time. I experimented with better random generation and color encoding this time.
Life.
This one is pretty basic too. This is a simple implementation of Conway’s Game of Life. I experimented with manipulating pixel arrays directly and changing pixel density. There might be some bugs around the edges of the map, but the simulaiton still works well. I like the gradual expansion and it even produces gliders.
This time I experimented with procedural animation. The result is barebones because I was in a rush, but I learned a lot about circle math and P5’s drawing transforms.
Another simple sketch. This time I didn’t erase stuff on the canvas, only adding to it. I think that takes a hit on performance. However, it makes drawing easier.
Ball.
This is the best one so far.
A remix of waves. I wanted to make the grid structure sparse and more like a graph. I didn’t have time to implement anything but at least it looks cooler.
Nev.
No time today.
Ahahah
More old stuff.
So I started again. This should technically be day 17 (or 45), but it was arbitrary so I called it Day N. I had the idea for this while opening and closing a door repeatedly. I then imagined another door opening and closing at the same time and then the point where they meet, and then this happened. There are probably some mistakes in this, but I’m proud of the trigonometry.