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?#
๐ค