The creative potential of random#
Dr Ben Swift
COMP1720 guest lecture
randomness is everywhere in generative art
let’s learn to wield it
if you’re reading these slides at home, watch the video
a little history#
chance is older than the computer
older than computers#
musikalisches würfelspiel — 18th-century dice music
aleatoric composition — 20th century
chance has always been an artistic tool
not all randomness is created equal
(but this isn’t a maths lecture)
weighting, the cheap way#
const loaded = [1, 2, 2, 2, 2, 3, 4, 5, 6];
const roll = random(loaded);repeat the values you want more often
weighting, the deliberate way#
if (random(100) < 10) {
// the 10% branch
} else {
// the other 90%
}mapping is where the art is#
what do you do with the random number?
pitch, position, colour, size, timing…
choosing where not to be random matters just as much
the balance between predictability and surprise
that’s the craft
re-creating static#
loadPixels();
for (let i = 0; i < pixels.length; i++) {
pixels[i] = random() < 0.5 ? 0 : 255;
}
updatePixels();re-creating Blue Poles?#
🤔