Monica Chang – Project 05 – Wallpaper

sketch

//Monica Chang
//Section D
//mjchang@andrew.cmu.edu
//Project-5-Wallpaper

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

function draw() {
  background(191, 145, 45);
  drawGrid();

  
}

function drawGrid() {
  // noprotect
  
  //base of design
  for (var y = 0; y < 450; y += 10) {
        for (var x = 0; x < 650; x += 10) { //repeating ellipses          
            fill(0, 255, 38);
            noStroke();
            ellipse(x, y, 6, 10);
        }
// repetitive quads overlapping the ellipses    

  var xr = 20;
  for (var b = -50; b < height + 50; b += 20) { //quad rows
      for (var a = -50; a < width + 50; a += 20) { // quad columns
          noStroke();
          fill(0, 255, 38);
          quad(a, b, b + xr, b - sqrt(3) * xr / 4,  a + 2 * xr, b, a + xr,  b - sqrt(3) * xr / 4); // manipulating the quads so that they for mini-waves.
        }
    }
  }
}

For this project, I was inspired by the idea of green mesh details covering a nude fitting(design for fashion.)

It’s nice to know that loops can do so much work for us. I had a lot of trouble getting the quads to create a subtle wave but I managed to calculate the values that would help create that small detail.

Leave a Reply