Posts Tagged ‘art’

Genetic Algorithm Art Fail

Wednesday, February 24th, 2010

Today I have started an experiment to use a Genetic Algorithm to create artistic drawings. I hope to achieve results similar to Bergen and Ross from Brock University. As a test, I tried approximating the Mona Lisa in grayscale using only circles. Here is the result.

Fail.

While this is an interesting image, it doesn’t look a lot like the Mona Lisa. Some of the largest features of the Mona Lisa are present to a degree, such as a light region in the center, dark bottom corners, and a light top-right corner. However, I wouldn’t call this a success.

What went wrong? I believe that the set of genetic operators I chose (the Galib defaults) are not appropriate, especially the mutation operator. I will implement some new ones that make more sense and try again. Hopefully the results improve.

For the Genetic Algorithms, I am using Galib. For the image manipulation code, I am using CImg.

CImg Image Library for C++

Wednesday, February 24th, 2010

Today I started playing around with the CImg library. It’s a library for C++ which can read and write image files in many common formats, and also manipulate images in memory. I want to use it for some specific computer art projects that I have had in mind for a little while.

As a test to familiarize myself with the CImg API, I constructed the following image. It’s a bunch of multicolored semi-transparent circles placed in a golden ratio spiral pattern. Click the image for a bigger version.

A golden ratio spiral pattern, using multicolored semi-transparent circles