Nayeon-Project05-WallPaper

nayeonk1

//Na-yeon Kim
//15-104, B section
//nayeonk1@andrew.cmu.edu
//Project-05 (WallPaper)

function setup() {
    createCanvas(451, 600);
    background(255);
    noStroke();
}

function draw() {
  //background pattern
    for (var x = 0; x < width + 50; x += 50) {
      for (var y = 0; y < height + 50; y += 50) {
        fill(230, 130, 90, 100);
        ellipse(x, y, 100, 100);
      }
    }
  //white lines
    var x = 0;
    var y = 0;
    var len = height;
    var spacing = 50;

    for (var x = 25; x < width; x += spacing) {
  //white lines_thick line
      strokeWeight(8);
      stroke(255, 200);
      line(x, y, x, y + len);
  //white lines_thin lines
      strokeWeight(2);
      stroke(255, 180);
      line(x + 8, y, x + 8, y + len);
      line(x + 42, y, x + 42, y + len);
    }
  //flowers
    push();
    var px = 0;
    var py = 0;
    for (var px = 0; px < width; px += spacing) {
      for (var py = 0; py < height + 50; py += 50) {
      flower(px, py);
    pop();
    }
  }
    noLoop();
}
  //flower draw function
  function flower(px, py) {
    push();
    translate(px, py);
    noStroke();
    for (var i = 0; i < 6; i ++) {
      fill(250, 80, 60);
      ellipse(0, 0, 6, 15);
      rotate(PI/4)
      fill(255);
      ellipse(0, 0, 3, 3);
    }
  }

I got inspired by this wallpaper. It reminds me of grandparents house.

From this image, I tried to make something similar, but using loop function and shapes. It was fun to manipulate some var and loops to create different images. Changing small position creates whole other images.

wallpaper_draft

Leave a Reply