Skip to main content
Back to Writing

Randomness in Generative Art

Randomness in Generative Art

Randomness in Generative Art

Randomness is one of the fundamental building blocks of generative art. Many systems rely on it to introduce variation, avoid repetitive outcomes, and produce results that cannot be predicted in advance. Yet randomness is more complex than it first appears.

From Physical Methods to Computer Randomness

Long before computers existed, people relied on physical methods to generate random outcomes. Rolling dice, flipping coins, shuffling cards, or drawing lots all depend on physical processes whose results are difficult to predict. What these methods have in common is that they involve countless small variables that are practically impossible to control.

Computers, however, operate differently. A computer executes instructions exactly as they are given. When a program is run with the same inputs, it will always produce the same result. For this reason, the random numbers generated by computers are rarely random in the true sense. Instead, they are produced by mathematical algorithms that generate sequences of numbers that only appear random. These algorithms are known as pseudo-random number generators (PRNGs).

Drawing Random Lines with p5.js

The following p5.js sketch draws fifty random lines each time it is executed.

function setup() {
  createCanvas(600, 600);
  noLoop();
}

function draw() {
  background(0);

  //randomSeed(10);

  stroke(255, 50, 70, 150);
  strokeWeight(2);

  for (let i = 0; i < 50; i++) {
    let x1 = random(0, width);
    let y1 = random(0, height);
    let x2 = random(0, width);
    let y2 = random(0, height);
    line(x1, y1, x2, y2);
  }
}

In its current form, the sketch produces a different composition every time it runs. However, if the commented line randomSeed(10) is enabled, the system starts from a fixed initial value. As a result, every execution generates the exact same sequence of numbers, producing the same composition again and again.

Seed: Deterministic Identity
Seed: Deterministic Identity

This demonstrates an important property of computer-generated randomness. Although the values appear random, they become entirely reproducible when the same seed is used. At this point, the seed is no longer just a technical parameter. It becomes part of the creative process itself. Given the same rules and the same seed, the exact same work can always be recreated.

The Balance Between True Randomness and Control

In some fields, however, pseudo-randomness is not enough. Cryptography and security applications require randomness that is genuinely unpredictable. To achieve this, computers may collect data from physical phenomena such as electronic noise, atmospheric activity, or radioactive decay. Because these methods rely on unpredictable events in the physical world, they can provide a much higher degree of unpredictability than conventional pseudo-random generators.

But does generative art really require perfect randomness?

In most cases, the answer is no.

Completely random systems rarely produce compelling results. On its own, randomness often generates little more than noise. What matters is the balance between randomness and structure. The artist defines the rules, constraints, and behaviors of a system, while randomness introduces variation within those boundaries.

The Artist's Role: Designing the System

Randomness is not the same as chance. In generative art, randomness is not used to surrender control, but to create variation within a carefully designed framework. The artist does not determine every outcome directly. Instead, they design the conditions under which those outcomes can emerge.

In this sense, randomness is not the opposite of control. It is an integral part of it. The challenge is not to eliminate randomness, but to guide it within meaningful limits.

For this reason, it is misleading to think of generative systems as machines that simply produce random results. Their true purpose is to use uncertainty within a structured framework to generate outcomes that are both unexpected and coherent.

Randomness alone does not create meaning. Rolling a die may produce an interesting result, but by itself it tells no story. Meaning emerges from the rules that shape randomness, the system that organizes it, and the choices made by the artist.

The artist's role, therefore, is not to predetermine every possible outcome, but to design the conditions from which those outcomes can arise. Rules are established, constraints are defined, and behaviors are introduced. The system then begins exploring its own field of possibilities.

This is perhaps what makes generative art so compelling. A work is created not solely through the artist's direct intervention, but through the interaction between a carefully designed system and the unexpected results that emerge from it.

Share