xxxxxxxxxx
25
const NUM_VERTICES = 3
let vertices = []
function setup() {
createCanvas(400, 400)
colorMode(HSB, 1, 1, 1, 1)
background(0)
let diameter = 30
for (let i = 0; i < NUM_VERTICES; i++) {
let x = random(diameter, width - diameter)
let y = random(diameter, height - diameter)
vertices.push({x, y})
}
}
function draw() {
background(0.3, 0.03)
for (let v of vertices) {
v.x += random(-2, 2)
v.y += random(-2, 2)
fill(0.5, 0.2)
circle(v.x, v.y, 30)
}
}