Skip to content

Instantly share code, notes, and snippets.

@lsei
Created June 20, 2020 21:34
Show Gist options
  • Save lsei/9e47431eb5e76d6f51be2bec56d29b89 to your computer and use it in GitHub Desktop.
Save lsei/9e47431eb5e76d6f51be2bec56d29b89 to your computer and use it in GitHub Desktop.
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(214, 213, 210);
translate(windowWidth / 2, windowHeight / 2);
scale(1.5);
circGradient(0, 0, 800, 1000, color(46, 31, 50), color(214, 213, 210));
circGradient(0, 0, 600, 800, color(27, 20, 25), color(46, 31, 50));
circGradient(0, 0, 590, 600, color(214, 213, 210), color(27, 20, 25));
circGradient(noise(millis() / 1000) * 0, noise(millis() / 1000) * 0, 300, 590, color(46, 31, 50), color(214, 213, 210));
circGradient(noise(millis() / 1000 + 0) * 0, noise(millis() / 1000 + 0) * 0, 0, 300, color(27, 20, 25), color(46, 31, 50));
}
function circGradient(x, y, rInner, rOuter, cInner, cOuter) {
push();
strokeWeight(2);
noFill();
for (let r = rOuter; r >= rInner; r--) {
let c = lerpColor(cInner, cOuter, (r - rInner) / (rOuter - rInner));
stroke(c);
circle(x, y, r / 2);
}
pop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment