Evolving Geometry from matt ditton on Vimeo.
For my first attempt at making a genetic algorithm, is there any better subject than the Mona Lisa and some random dude from google image search?
The premise is simple. By randomly changing the color, position and diagonal edge direction of a grid of polygons can you turn it into the target image.
All written in Processing, the grid draws to a PGraphic on every change and a fitness test is done against the target image. If the fitness is better than or equal the change is kept. If not, it’s reverted. Keeping the equal-to in the test causes that crazy vertex movement in the lower image, so that bugs going.
The left image is the grid with vertex colour, the right is the target and the middle is the wireframe of the polygons. The number is the fitness. The lower the number the closer tobeing an exact match.
This is the slowed down version for making a video. I’ve got it running in a thread and it’s stupid fast. But because I’m drawing in the thread I’m getting colour sync errors in the main draw thread. It works fast but the flashing colours get pretty distracting.
Inspiration for this work has to go to
Karl Sims and
Roger Alsing. They are the giants, I’m just standing here.