Generative art [1]

24 Dec 2018

Computer-generated art

Generative art

I didn’t use Photoshop or a camera to create this picture - instead I coded it using ideas from the world of generative art: the creation of art by autonomous systems (typically software) following procedures defined by the artist.

Computer-based generative art first appeared in the 1960s and has been used to create imagery, music, architectural designs and even stories. Nowadays, one of the main applications is creating landscapes, buildings and other content for computer games. There are some really good instructional resources available, and one of these by Anders Hoff inspired me to have a go myself.

How it works

For my first try, I developed a really simple algorithm (inspired by one of Hoff’s). First, draw some points in a grid on the screen. Then, repeat the following process many, many times:

The computer moves the points so that over time, each point gradually traces out a circle. Because the circles created by the moving points vary in size, the lines drawn between the points create fascinating spirograph-like shapes. The colour of the dots that form each line depend on the length of the line.

The resultant image illustrates a very common outcome in generative art: extremely complex patterns emerge from the repeated application of quite simple rules. It’s no surprise that generative art can create images that are biological in their complexity, since many forms in nature are themselves created by pattern-based developmental process. I’m planning to create more images like this, gradually increasing their complexity by developing and exploring more sophisticated algorithms.

Technical details

I programmed this pattern generator in the C# language using Microsoft Visual Studio (which is free).

The pattern is controlled by the following parameters:

The code maintains a 2D array of the nodes, each of which has:

Coding the algorithm was quite straightforward, and was actually faster than learning how to create the basic program framework in Visual Studio. Some additional complexity arose because I wanted the graphics window to be responsive while the pattern-generating algorithm was running: this involved making the code multi-threaded.