Project-05-Wallpaper

sketchDownload
//Isabel Xu
//15-104 Section A
const Y_AXIS = 1;
function setup() {
  createCanvas(480,480);
  // Two color in the end of the neon hue
  c1 = color(223,255,0);
  c2 = color(116, 0, 225);

  noLoop();
}

function draw() {
  // background
  setGradient(0, 0, 480, 480, c1, c2, Y_AXIS);
  //ellipseShape
  drawPattern();

}

function setGradient(x, y, w, h, c1, c2, axis) {
  noFill();

    for (let i = y; i <= y + h; i++) {
      let inter = map(i, y, y + h, 0, 1);
      let c = lerpColor(c1, c2, inter);
      stroke(c);
      line(x, i, x + w, i);
    }
}

function drawPattern(){
	cirW=150;
  	for (var x = 0; x <= width;x +=150){
  		cirH=150;
  		for (var y = 0;y <= height;y+=150){
  		noStroke();
  		fill(250);
  		ellipseMode(CORNER)
  		ellipse(x,y,cirW,cirH);
  		cirH-=40;
  	}
  	cirW-=40;
  }
}

A study on geometric symbols evolved from circles.

Leave a Reply