Skip to content

Gray spiral

Unsure why this one came out so gray. It's so grayscale that I'm reminded of my phone's "bedtime" mode! 😂

A gray spiral of cut-out circle arcs transforms into ripples and then back into a spiral

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  let t = millis() / 10000
  
  noStroke()
  fill(0)
  translate(200, 200)
  
  let r = -10
  for (let i = 0; i < 25; i ++) {
    fill(map((1*i)%4, 0, 3, 0, 255))
    let ro = r
    r = r * 1.2
    let a = t / 1
    rotate(a)
    push()
    beginClip({invert: true})
    circle(0, r - ro, r)
    endClip()
    circle(0, 0, ro)
    pop()
    translate(0, r - ro)
  }
}

(Originally seen at https://editor.p5js.org/bojidar-bg/sketches/2zcq7wiEp)

Experiments tagged p5 (83/85)

Experiments on this site (83/85)