Aaron Lee – Project 05 – Wallpaper

sketch

/*
Aaron Lee
//Section C
//sangwon2@andrew.cmu.edu
Project-05-Wallpaper
*/

function setup() {
    createCanvas(600, 600);
    background("grey");
    var d = 30;

    for (var y = 0; y < 660; y = y + 60) {
        for (var x = 0; x < 600; x = x + 60) {
          push();
          fill('#809DFF');
          beginShape();
          vertex(x, y);
          vertex(x + 10, y - 10);
          vertex(x + 20, y);
          vertex(x + 30, y - 10);
          vertex(x + 40, y);
          vertex(x + 20, y + 20);
          endShape(CLOSE); //the shape1
          pop();
          push();
          fill('#5A5B83');
          beginShape();
          vertex(x, y);
          vertex(x + 20, y + 20);
          vertex(x + 20, y + 80);
          vertex(x + 10, y + 60);
          vertex(x + 10, y + 30);
          vertex(x, y + 20);
          endShape(CLOSE); //the shape2
          pop();
          }
        }

    for (var y1 = -30; y1 < 660; y1 = y1 + 60) {
        for (var x1 = 0; x1 < 600; x1 = x1 + 60) {
          push();
          fill('#CCD8FF');
          beginShape();
          vertex(x1 + d, y1);
          vertex(x1 + 10  + d, y1 - 10);
          vertex(x1 + 20  + d, y1);
          vertex(x1 + 30  + d, y1 - 10);
          vertex(x1 + 40 + d, y1);
          vertex(x1 + 20 + d, y1 + 20);
          endShape(CLOSE); //the shape3
          pop();
          push();
          fill("#7274CC");
          beginShape();
          vertex(x1 + d, y1);
          vertex(x1 + 20 + d, y1 + 20);
          vertex(x1 + 20 + d, y1 + 80);
          vertex(x1 + 10 + d, y1 + 60);
          vertex(x1 + 10 + d, y1 + 30);
          vertex(x1 + d, y1 + 20);
          endShape(CLOSE); //the shape4
          pop();
          }
        }
    noLoop();
}

function draw() {
    // draw is not called due to noLoop() in setup()
}

This was a rather simple process. First, setting up a loop function for both x and y. Then I created shapes in rows that create illusion.

Chelsea Fan-Project-05


Wallpaper

/* Chelsea Fan
Section 1B
chelseaf@andrew.cmu.edu
Project-05
*/

function setup() {
    createCanvas(400, 400);
    background(255, 250, 205);
}
var xCoord = 10; //x coordinate of rect
var yCoord = 10; //y coordinate of rect
var xRect = 10; //width of rect
var yRect = 50; //height of rect
var spacing = 20; //spacing between rect
var horiz = -16; //horiz spacing between rect
var r = 255; //red color 
var g = 220; //green color
var b = 220; //blue color

function draw() {
	for (var i = 0; i < 13; i++) {
		stroke(0); //stroke color black
		fill(r, g, b); //color of rect
	    rect((xCoord+spacing)*i+horiz*spacing, (yCoord+spacing)*i, xRect, yRect); //rectangles
	    stroke(255); //change stroke color to white
	    line(30*i, 0, 30*i, height); //vertical white stripes
	    }
	horiz = horiz + 3; 
	r = r - 3; //change in red color
	g = g + 3; //change in green color
	b = b + 3; //change in blue color

    for (var i = 0; i < 21; i++) { 
    	line(0, 20*i, width, 20*i); //horizontal white stripes
    }

}

Mihika Bansal – Project 05 – Wallpaper

sketch

//Mihika Bansal 
//mbansal@andrew.cmu.edu 
//Section E 
//Project 5

var diam = 66; //diameter
var Cdist = 198; //distance between 3 circles
var rad = 33; //circle radius 



function setup() {
    createCanvas(594, 582);
    background(255, 238, 173); // making my background canvas
    

    for(var i = 0; i < 10; i ++){ //determining # of rows 
        if(i % 2 == 0){ // determining if row is even or odd 
            for(var j = 0; j < 3; j ++){ // three of the first kind of ellipse in each row
                
                //first ellipse pattern 
                var posX1 = rad + Cdist * j; // determing x position of each of the 3 ellipses
                var posY1 = rad + diam * i * (0.5 * sqrt(3)); //determing y position of each of these ellipses
                //var posY1 = 33; 
                strokeWeight(0); 
                fill(150, 206, 180);  
                ellipse(posX1, posY1, diam, diam); //making blue ellipse
                fill(255, 204, 92);
                ellipse(posX1, posY1, 55, 55); //making yellow ellipse
                push(); 
                stroke(255, 238, 173); 
                strokeWeight(2); 
                translate (posX1, posY1); //making center lines
                for (var k = 0; k < 25; k ++){
                    line(0, 0, 27, 0);
                    rotate(PI/9); 
                } 
                pop();
            }
            for(var a = 0; a < 3; a ++){ // will be three of these ellipses

               //second ellipse pattern 
                var posX2 = (3 * rad) + Cdist * a; // the position of the second ellipse, which is 3 * radius
                fill(255, 111, 105); 
                ellipse(posX2, posY1, 66, 66); //making the target like ellipses
                stroke(255, 238, 173);
                strokeWeight(3);
                fill(150, 206, 180);
                ellipse(posX2, posY1, 40, 40); 
                fill(255, 111, 105); 
                ellipse(posX2, posY1, 15, 15);
                strokeWeight(0);
            }

            for(var b = 0; b < 3; b++){

                //third ellipse pattern 
                var posX3 = (5 * rad) + Cdist * b; //the base distance is 5 times the radius
                strokeWeight(0); 
                fill(255, 204, 92);
                ellipse(posX3, posY1, 66, 66); //making the ellipse bases
                fill(150, 206, 180);
                ellipse(posX3, posY1, 54, 54);


                push(); 
                strokeWeight(1); //making the rotated squares
                stroke("white"); 
                rectMode("center"); 
                translate(posX3, posY1);
                for (var m = 0; m < 3; m ++) {
                    rect(0, 0, 34, 34); 
                    rotate(PI/5); 
                }
                pop(); 

                fill(255, 204, 92);
                ellipse(posX3, posY1, 34, 34); //center ellipse
            }
        }
        else{ //if row is odd 
            for(var j = 0; j < 3; j ++){
                
                //first ellipse pattern, which was the third pattern 
                var posX1 = 2 * rad + Cdist * j; //want to fit in the gaps between the circles
                var posY1 = rad + diam * i * (0.5 * sqrt(3)); //using the ratio to make the circles fit exactly with eachother 
                strokeWeight(0); 
                fill(255, 204, 92);
                ellipse(posX1, posY1, 66, 66); 
                fill(150, 206, 180);
                ellipse(posX1, posY1, 54, 54);


                push(); 
                strokeWeight(1); 
                stroke("white"); 
                rectMode("center"); 
                translate(posX1, posY1);
                for (var m = 0; m < 3; m ++) {
                    rect(0, 0, 34, 34); 
                    rotate(PI/5); 
                }
                pop(); 

                fill(255, 204, 92);
                ellipse(posX1, posY1, 34, 34); 
                
            }
            for(var a = 0; a < 3; a ++){

               //second ellipse pattern, which was actually the first ellipse 
                var posX2 = (4 * rad) + Cdist * a; //fits in between the gaps again
                strokeWeight(0); 
                fill(150, 206, 180);  
                ellipse(posX2, posY1, diam, diam); 
                fill(255, 204, 92);
                ellipse(posX2, posY1, 55, 55);
                push(); 
                stroke(255, 238, 173); 
                strokeWeight(2); 
                translate (posX2, posY1); 
                for (var k = 0; k < 25; k ++){
                    line(0, 0, 27, 0);
                    rotate(PI/9); 
                } 
                pop();
                
            }

            for(var b = 0; b < 3; b++){

                //third ellipse pattern, which was actually the second
                var posX3 = (6 * rad) + Cdist * b;
                fill(255, 111, 105); 
                ellipse(posX3, posY1, 66, 66);
                stroke(255, 238, 173);
                strokeWeight(3);
                fill(150, 206, 180);
                ellipse(posX3, posY1, 40, 40); 
                fill(255, 111, 105); 
                ellipse(posX3, posY1, 15, 15);
                strokeWeight(0);

                //drawing first ellipse in the row for even rows, at the position 0 
                fill(255, 111, 105); 
                ellipse(0, posY1, 66, 66);
                stroke(255, 238, 173);
                strokeWeight(3);
                fill(150, 206, 180);
                ellipse(0, posY1, 40, 40); 
                fill(255, 111, 105); 
                ellipse(0, posY1, 15, 15);
                strokeWeight(0);
            }

        }
    }

   
    noLoop(); 
}
   
  
function draw() {

  
}

This project was really fun to do. I really enjoyed coming up with distinct ellipse patterns to start with, then figuring out how to put them together to create a new pattern. I tried multiple iterations of what the circles would look like overlapped, but I realized it looked the cleanest in this manner.

Steven Fei-Project5-Wallpaper


sketch

 

This approach is to take advantage of the multiple nested loops to further my string art approach of creating the red “illusion” curves through repetition and more rigid layouts. The inspiration is still from the Sharingan in Naruto.


function setup() {
    createCanvas(600, 600);
    background("black");
    
    
}
var angle;//variables for the red fish curves
var radius = 8;//varaibles for the size of red curves

function draw() {
    
    
//   background lines
    for (var y = 0; y<height; y+=60){
        for (var x = 0; x<width; x+=60){
            stroke(35,41,54);
            strokeWeight(2);
            line(x, y, x+60, y+60);//rightward diagonal line
            stroke(148,148,148);
            line(x+40, y, x-40, y+60);//leftward light grey line
            stroke(77,78,80);
            line(x+30, y, x+90, y+60); //rightward dark gray line
        }
    }
    // yellow hex circles
    var radiusTwo = 12;
    for (var y = 0; y < height; y+=120){
        for(var x = 0; x < width; x+=100){
            push();
            translate(x+50, y+30+40);
            for (var i = 0; i<6; i++){
                push();
                rotate(radians(30));
                rotate(radians(i*360/6));
                noStroke();
                fill(255,255,102);
                circle(radiusTwo, 0, 5);
                pop();
            }
            pop();
        }
    }

// constructions of the red wheels    
    for(var y = 0; y < height; y += 120){
        for (var x = 0; x < width; x+= 100){
            push();
            translate(x+50, y+30); // spacing
            // top part of the red fish
            rotate(-PI/2);
            for (angle = 0; angle <90; angle += 5){
                angConv = radians(angle);
                angConv2 = 1.5*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), 2*radius*cos(angConv2), 2*radius*sin(angConv2));
            }
            for (angle=90; angle<100; angle += 3){
                angConv = radians(angle);
                angConv2 = 1.8*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), 2*radius*cos(angConv2), 2*radius*sin(angConv2));
                
            }
            for (angle=120; angle<=180; angle += 3){
                angConv = radians(angle);
                angConv2 = 3*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), -radius-radius*cos(angConv2), -radius*sin(angConv2));
                
            }
            for (angle=135; angle<163; angle+=4){
                angConv = radians(angle);
                strokeWeight(0.5);
                stroke("red");
                line(radius, radius, 2*radius*cos(angConv), 2*radius*sin(angConv));
            }
            // left part of the red fish
            rotate(PI/2); //return to the original angle coordinates
            translate(-30, 50);
            rotate(radians(30));
            for (angle = 0; angle <90; angle += 5){
                angConv = radians(angle);
                angConv2 = 1.5*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), 2*radius*cos(angConv2), 2*radius*sin(angConv2));
            }
            for (angle=90; angle<100; angle += 3){
                angConv = radians(angle);
                angConv2 = 1.8*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), 2*radius*cos(angConv2), 2*radius*sin(angConv2));
                
            }
            for (angle=120; angle<=180; angle += 3){
                angConv = radians(angle);
                angConv2 = 3*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), -radius-radius*cos(angConv2), -radius*sin(angConv2));
                
            }
            for (angle=135; angle<163; angle+=4){
                angConv = radians(angle);
                strokeWeight(0.5);
                stroke("red");
                line(radius, radius, 2*radius*cos(angConv), 2*radius*sin(angConv));
            }
            //right part of the red fish
            rotate(radians(-30)); //return to the original angle coordinates
            translate(60, 0);
            rotate(radians(-30));
            for (angle = 0; angle <90; angle += 5){
                angConv = radians(angle);
                angConv2 = 1.5*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), 2*radius*cos(angConv2), 2*radius*sin(angConv2));
            }
            for (angle=90; angle<100; angle += 3){
                angConv = radians(angle);
                angConv2 = 1.8*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), 2*radius*cos(angConv2), 2*radius*sin(angConv2));
                
            }
            for (angle=120; angle<=180; angle += 3){
                angConv = radians(angle);
                angConv2 = 3*angConv;
                strokeWeight(0.5);
                stroke("red");
                line(radius+radius*cos(angConv), radius*sin(angConv), -radius-radius*cos(angConv2), -radius*sin(angConv2));
                
            }
            for (angle=135; angle<163; angle+=4){
                angConv = radians(angle);
                strokeWeight(0.5);
                stroke("red");
                line(radius, radius, 2*radius*cos(angConv), 2*radius*sin(angConv));
            }
            pop();
        }
    }
   

}

Alec Albright – Project 05 – Wallpaper

sketch

// Alec Albright
// aalbrigh@andrew.cmu.edu
// Section B
// Project 5 - Wallpaper

var diamondH = 10; // height of the diamonds
var diamondW = 10; // width of the diamonds
var diaMargin = 5; // space between a diamond and its outline
var thickStripe = 20; // stroke weight of the thick stripe
var thinStripe = 3; // stroke weight of the thin stripe

function setup(){
    createCanvas(500, 500);
    angleMode(DEGREES);
}

function draw(){
    background("skyblue");

    // drawing the diamonds
    // controling rows
    for(x = 0; x < 550; x += 25){
        // controlling number of diagonal lines
        for(y = -500; y < 500; y += 175){
            drawDiamond(x + y , x);
        }
    }

    // drawing the stripes
    for(x = -100; x < 550; x += 175){
        for(y = 0; y < 500; y += 175){
            drawStripes(x, y);
        }
    }
    noLoop();
}

// draws one diamond and its outline
function drawDiamond(x, y){
    strokeWeight(1);
    stroke("black")
    push();
    translate(x, y);

    rotate(135);
    // diamond
    fill("orange");
    rect(diaMargin, diaMargin, diamondW, diamondH);

    // outline
    // makes the rectangle transparent
    fill(0, 0, 0, 0);
    rect(0, 0, diamondW, diamondH);

    pop();
}

// draws big and little stripes to fill gaps of the diamonds
function drawStripes(x, y){
    // drawing first big stripe
    stroke("white");
    strokeWeight(thickStripe);
    line(x, y, x + 500, y + 500);

    // little stripe
    stroke("orange");
    strokeWeight(thinStripe);
    line(x + 30, y, x + 530, y + 500)

    // other big stripe
    stroke("white");
    strokeWeight(thickStripe);
    line(x + 60, y, x + 560, y + 500);
}


I originally sketched this to include less frequent diagonals of the diamonds, but upon creation I really liked the contrast between the horizontal positioning of the diamonds and the diagonal positioning of the stripes. I also wanted to implement a vibrant color palette, which manifested itself as light blue, orange, and white. My biggest difficulty in creating this wallpaper was dealing with replicating the diagonals. Particularly, the diamonds were difficult because I rotated them upon drawing them, so their coordinate system became harder to keep track of.

Below is my original sketch:

Original sketch

Taisei Manheim – Project 05 – Wallpaper


sketch

For this project I wanted the repetition to be a geometric pattern.  I chose this pattern because of the sense of three dimensionality it gave as well as the interesting relationship between positive and negative space.

//Taisei Manheim
//Section C
//tmanheim@andrew.cmu.edu
//Assignment-05

function setup() {
    createCanvas(600, 600);
    background(128);
    var w = 50;
    for (var y = 0; y < height + 50; y += 100) {
        for (var x = 0; x < width; x += 100) {
            //top quad
            stroke(255);
            fill(255,192,203);
            quad(x, y, x + w, y - sqrt(3) * w / 4,  x + 2 * w, y, x + w, y + sqrt(3) * w / 4); ;
            line(x + 2 * w - 10, y - 5, x + w - 10, y + sqrt(3) * w / 4 - 5);
            line(x + 2 * w - 20, y - 10, x + w - 20, y + sqrt(3) * w / 4 - 10);
            line(x + 2 * w - 30, y - 14, x + w - 30, y + sqrt(3) * w / 4 - 14);
            line(x + 2 * w - 40, y - 18, x + w - 40, y + sqrt(3) * w / 4 - 18);

            //left quad
            stroke(255);
            fill(255,162,233);
            quad(x, y, x + w, y + sqrt(3) * w / 4, x + w, y + sqrt(3) * w / 4 + 57, x, y + 57); 
            line(x, y + 11, x + w, y + sqrt(3) * w / 4 + 11);
            line(x, y + 22, x + w, y + sqrt(3) * w / 4 + 22);
            line(x, y + 33, x + w, y + sqrt(3) * w / 4 + 33);
            line(x, y + 44, x + w, y + sqrt(3) * w / 4 + 44);

            //right quad
            stroke(255);
            fill(255,132,255);
            quad(x + w, y + sqrt(3) * w / 4, x + 2 * w, y, x + 2 * w, y + 57, x + w, y + sqrt(3) * w / 4 + 57); 
            line(x + 2 * w - 10, y + 5, x + 2 * w - 10, y + 57 + 5);
            line(x + 2 * w - 20, y + 10, x + 2 * w - 20, y + 57 + 10);
            line(x + 2 * w - 30, y + 14, x + 2 * w - 30, y + 57 + 14);
            line(x + 2 * w - 40, y + 18, x + 2 * w - 40, y + 57 + 18);
        }
    }
    noLoop();
}

Emma NM-Project-05(Wallpaper)

My Wallpaper

/* 
Emma Nicklas-Morris
Section B
enicklas
Project-05
Wallpaper
*/

// width and height of diamonds (squares)
var big = 100;
var med = 90;
var sm = 80;
var smaller = 70;
var smallest = 60;
var tiny = 20;

// space between diamonds (based off the large one)
var space = 20; 

function setup() {
    createCanvas(500, 500);
    background("#F5DEBB");
    for (var i = 0; i < 10; i++) {
        for (var j = 0; j < 10; j++) {
            noStroke();
            rectMode(CENTER);
            drawBig(i, j);
            drawMed(i, j);
            drawSm(i, j);
            drawSmaller(i, j);
            drawSmallest(i, j);
            tinyDiamond(i, j);
            blueDiamond(i, j);
        }
        
    }
    noLoop();

}

// Draws large purple diamond (square rotated)
function drawBig(i, j) {
    push();
    translate(width/2, -height/2);
    rotate(radians(45));
    fill("#581845")
    rect(big * i + space * i, big * j + space * j, big, big);
    pop();
}

// Draws medium purple-pink diamond (square rotated)
function drawMed(i, j) {
    adj = 7.5;
    push();
    translate(width/2, -height/2 - adj);
    rotate(radians(45));
    fill("#900C3F");
    nSpace = big - med + space
    rect(med * i + nSpace * i, med * j + nSpace * j, med, med);
    pop();
}

// Draws small magenta diamond (square rotated)
function drawSm(i, j) {
    adj = 15;
    push();
    translate(width/2, -height/2 - adj);
    rotate(radians(45));
    fill("#C70039");
    nSpace = big - sm + space
    rect(sm * i + nSpace * i, sm * j + nSpace * j, sm, sm);
    pop();
}

// Draws smaller orange diamond (square rotated)
function drawSmaller(i, j) {
    adj = 22.5;
    push();
    translate(width/2, -height/2 - adj);
    rotate(radians(45));
    fill("#FF5733");
    nSpace = big - smaller + space
    rect(smaller * i + nSpace * i, smaller * j + nSpace * j, smaller, smaller);
    pop();
}

// Draws smallest yellow diamond (square rotated)
function drawSmallest(i, j) {
    adj = 30;
    push();
    translate(width/2, -height/2 - adj);
    rotate(radians(45));
    fill("#FFC30F");
    nSpace = big - smallest + space
    rect(smallest * i + nSpace * i, smallest * j + nSpace * j, smallest, smallest);
    fill("#F5DEBB");
    rect(nSpace * i * 2, 0, space, height * 3); // split the diamonds into smaller ones
    rect(0, nSpace * j * 2, width * 3, space); // split the diamonds into smaller ones
    pop();
}

// Draws blue diamond on top of big diamond 
function blueDiamond(i, j) {
    push();
    translate(width/2, -height/3);
    rotate(radians(45));
    fill("#13B9BD");
    b = tiny /2;
    nSpace = big - b + space
    rect(b * i + nSpace * i, b * j + nSpace * j, b, b);
    pop();
}

// Draws tiny green diamond on top 
function tinyDiamond(i, j) {
    adj = 58.5
    push();
    translate(width/2, -height/2 - adj);
    rotate(radians(45));
    fill("#88D840");
    nSpace = big - tiny + space
    rect(tiny * i + nSpace * i, tiny * j + nSpace * j, tiny, tiny);
    pop();
}


I knew I wanted to do something geometric and repetitive with the use of a nice color palette. I started with the idea of creating squares that would be rotated to look like diamonds. From there, I knew I wanted to create a bullseye-like effect where all of the diamonds start at the top corner. Once that was created, I played with the idea of creating more diamonds inside those larger diamonds. Finally, I created my color palette based the rainbow and incorporated smaller diamonds to add to the complexity.

Sketch of my Wallpaper

Lanna Lang – Project 05 – Wallpaper

sketch

//Lanna Lang
//Section D
//lannal@andrew.cmu.edu
//Project 05-Wallpaper

function setup() {
  createCanvas(590, 480);
  //navy blue for right quad
  //that peeks out
  background('#25363e'); 
}

function draw() {
  
//left triangle
  //repeat every 100 pixels down the canvas
  for (var y = 0; y < height; y += 100) { 
    //repeat every 60 pixels across the canvas 
    for (var x = 0; x < width; x += 60) {
      //fill with lighter brown
      fill('#af9477'); 
      triangle(x, y, x + 30, y + 20, x, y + 40);
    }
  }

//right triangle
  //repeat every 100 pixels down the canvas
  //
  for (var y = 0; y < height; y += 100) {
    //repeat every 60 pixels across the canvas
    //with additional 50 pixels off screen
    for (var x = 60; x < width + 50; x += 60) {
      //fill with darker brown
      fill('#7e5535');
      triangle(x, y, x - 30, y + 20, x, y + 40);
    }
  }
  
//center quad
  //repeat every 100 pixels down the canvas
  for (var y = 20; y < height; y += 100) {
    //repeat every 60 pixels across the canvas
    for (var x = 30; x < width; x += 60) {
      //fill with cream color
      fill('#fbe8bd');
      quad(x, y, x + 30, y + 20, x, y + 40, x - 30, y + 20);
    }
  }
  
//lower left quad
  //repeat every 100 pixels down the canvas
  for (var y = -60; y < height; y += 100) {
    //repeat every 60 pixels across the canvas
    for (var x =0; x < width; x += 60) {
      //fill with ochre color
      fill('#dcae56');
      quad(x, y, x + 30, y + 20, x + 30, y + 80, x, y + 60);
    }
  }
noLoop();
}

I wanted my wallpaper to be more geometric and include a bold, aesthetic color palette, but I didn’t want it to be a simple geometric design. I came up with this design that combined triangles and quadrilaterals, and that combination of shapes was the repeated image. I love the combination of ochre and blue, so I decided to revolve my palette around those two. This code relies solely on math and how the coordinates of each shape correlate with one another.

My sketch of what the repeated image would be and a sample of how it would look.

Siwei Xie – Project 05 – Wallpaper

sketch

//Siwei Xie
//Section B
//sxie1@andrew.cmu.edu
//Project-05-wallpaper

function setup() {
    createCanvas(400, 400);
    background(236, 214, 180);
    
}

function draw() {
	//use Nested Loop to create shapes
	for (var j = 0; j < 13; j++) {
        for (var i = 0; i < 12; i++) {

        //maroon circles
        noStroke();
        fill(185, 88, 84);
        circle(i * 46 + 15, j * 30 + 15, 20);

        //yellow triangles
        fill("yellow");
        triangle(i*40+65, j*40+20, i*40+5, j*40+50, i*40+35, j*40+50);
        
        //white verticle lines
        fill("white");
        rect(i*46+15, 0, 3, 400);

        }
    }

    noLoop();
}

Nested loop is a very useful tool when creating repetitive patterns. It was fun to design an aesthetically pleasing image by balancing the colors and shapes of different elements.

I researched wallpaper or tablecloth patterns on the internet first, then tried to design my own image. I set the overall color to be soft and harmonious, by using a combination of pink, maroon, light yellow and white. The shapes I used include triangles, circles and rectangles, which overlap on each other to create a harmonious pattern.