Art is an ancient practice that humans have been utilizing for millenia for expressing creative ideas or imagination. Before the days of computers, art was always made by hand by people. But with the dawn of the age of technology, a new kind of art has emerged – generative art.

Generative art is a category of art that is created with code, using specific rules or systems.

These artworks are usually created with autonomous systems or sets of rules. Most instances of this incorporate several key factors of generative art to create unique designs every generation.

Although not every example will include all of these, some common techniques used in a generative art piece include randomness, recursion, repetition, and realism.

I. Randomness

"Creativity is the ability to introduce order into the randomness of nature."
– Eric Hoffer

Randomness is a pretty simple concept but can radically change how a generative piece looks. Because no computer can generate "true" randomness, many algorithms are used called "psuedorandom" number generators, or PRNGs, to replicate randomness. In reality it is completely regular, but it is random enough to serve a multitude of purposes. These PRNGs are what many generative artworks implement to guarantee unique designs every regeneration.

One simple system of rules for a generative system that uses this is called a random walker. A random walker is just a point that moves around a grid, taking individual steps up, down, left, or right. Each step it randomly chooses a direction to move in.

Now, using this incredibly simple rule, we let the walker take 10,000 steps and trace out its path (having it wrap around the screen if it goes off). The result is a pattern that looks like this:

For future refrence, zoom into examples for better resolution. The canvases are small to take up less space on the page.

Each generation is completely unique, but has a similar style to the others. That's a characteristic of generative art - random and varying results that all follow the same simple rules.

If we add more rules to the system, we get more interesting results. Here's a few examples of variations on the random walker system using a few different simple rules:

The walker's color varies randomly per step.

The walker only has a 25% chance of randomizing its direction each step, and is drawn at a lower opacity.

The walker gets a random hue every regeneration, and its brightness varies randomly per step.

The walker only moves diagonally, and is drawn at a lower opacity over a black background.

Here we see a key aspect of generative art at work: it seems to take on a life of its own. These small variations in the rules for how the walker moves or draws give very different designs from the initial version. At its heart, the way these 4 systems work is identical - a random walker crawling around a grid.

Advanced Examples of Randomness:

II. Recursion

"To understand recursion, one must first understand recursion."
– Unknown

Recursion is the repeated application of a process or procedure. Recursion is a broad category, but in generative art it usually means drawing something over and over in slightly different ways. For example, subdividing a circle repeatedly into smaller circles is an illustration of recursion.

Recursion in generative art is typically characterized by dependant iteration, meaning each step is somehow based on the previous one, instead of simply "redoing" the process. In the circle example, each step draws circles at 1/4 the size of the previous step, which means it is dependant on the one before it.

One implementation of recursion for generative art is a fractal tree. A fractal tree starts off as a single line, which splits into two smaller lines at the end. Then those two lines each also split into two smaller lines, and so on. Specifically, the two new branches are always rotated 90° apart.

After repeatedly applying this process to a single starting line, the final result looks like this. Click reset to iterate step-by-step through the fractal tree generations.

Here is another example of how one simple instruction (draw a line, draw two smaller lines at the end, repeat) can create interesting and intricate results. And again, we can modify the rules to create variations on this design:

The tree has a random hue each generation, and the lines get progressively thinner and darker every layer.

After each split, the new left branch's hue gets lower and the new right branch's hue gets higher.

The angle between new branches is randomized every reset. Current branch angle: °.

Advanced Examples of Recursion:

III. Repetition

"A creation is never merely repetition."
– Bruce Lee, clearly having never heard of generative art

In generative art, repetition is doing/drawing something multiple times in different ways. Repetition may seem similar to recursion, but the difference is that recursion is repeating a process after applying a uniform change to it every time, making each iteration directly dependant on the last one (e.g., each one is smaller than the last one). With repetition however, each reiteration is unrelated to any other iteration, but they are still all unique.

For a simple example, consider a grid of randomly colored circles.

While this isn't a particularly interesting example of repetition, it can serve as the basis for some variations which demonstrate instances of repetition in generative art.

Multiple concentric circles are drawn in each spot, at increasing or decreasing brightness.

Expressive smiley faces are drawn on top of each circle.

Each circle is drawn 50% larger than the original size, along with being drawn at a lower opacity with an outline.

Here we see another important aspect of creating generative art – typically the design of an artwork is as important if not more important than the structure of it. In the above examples, they all follow the same basic structure: uniform circles packed into a grid. But changing how each circle is drawn, we get surprisingly different results.

Advanced Examples of Repetition:

IV. Realism

"Reality is merely an illusion, albeit a very persistent one."
– Albert Einstein, allegedly

Generative art can also be used to replicate designs or patterns found in the real world, such as gravity, plants, terrain, and other natural processes. This category is also very broad and covers many areas of generative art. One process in particular that can be simulated with generative art is the subject of phyllotaxy, which refers to the arrangement of leaves or seeds in plants. Specifically, we are going to be inspired by the design that is made by the layout of seeds in a sunflower.

If we replicate a similar pattern using circles as a base system, we get a simple artwork that looks like this:

Even with just this simple generative system we can already see the connection to the pattern of the sunflower seeds. This design has many interesting properties, such as its connection to the golden ratio. This can be seen in how the seeds are generated – each seed is rotated one Golden Angle (≈137.5°) from the previous, and this angle is what maximizes how many seeds can fit into a given area, which is why plants like the sunflower utilize this ratio. If we take this basic structure and add more rules to the system, more complicated and interesting patterns emerge:

The seeds are drawn larger so they overlap underneath each other, and are given a random hue every regeneration.

Seeds are drawn larger and darker the further from the center they are.

The seeds are drawn as overlapping yellow triangles instead of circles, which more closely resembles the actual sunflower seed pattern.

Here we see a very specific example of how generative art can be used to model real-world phenomena; there are plenty of other examples of generative art even more realistically replicating natural concepts. This shows the power this type of art can truly have, and the depth and variety it possesses.

Advanced Examples of Realism:
"[Generative art] becomes a collaboration between the computer and the artist. Some aspects of the artwork are controlled by the coder, but not all of them. The artist controls both the randomness and the order in the art."
– Ali Spittel