Project 5: Wallpaper

For this week’s project, I decided to make a pattern off of 2 animals and the things that they eat! In this case, I chose a rabbit and a bear, and alternated the pattern in between the bigger animal face and smaller food item to create a rhythm both vertically and horizontally that alternates between big and small.

sketchDownload
// Susie Kim, Section A
// susiek@andrew.cmu.edu
// Assignment-05-A

function setup() {
    createCanvas(600, 600);
    background(163, 185, 216);
    noLoop();
}

function draw() {
	background(163, 185, 216);

	// bunnies
	for(var x = 25; x <= 600; x+= 150) {
		for(var y = 0; y <= 600; y+= 200){
			push();
			translate(x, y);
			bunny(x,y);
			pop();
		}
	}

    // carrots
	for(var x = -50; x <= 600; x+= 150) {
		for(var y = 0; y <= 600; y+= 200){
			push();
			translate(x, y);
			carrot(x,y);
			pop();
		}
	}

    // bears
	for(var x = -50; x <= 600; x+= 150) {
		for(var y = 100; y <= 600; y+= 200){
			push();
			translate(x, y);
			bear(x,y);
			pop();
		}
	}

    //fishes
	for(var x = 25; x <= 600; x+= 150) {
		for(var y = 100; y <= 600; y+= 200){
			push();
			translate(x, y);
			fish(x,y);
			pop();
		}
	}
}

function bunny(x,y) {
	// head
	noStroke();
	fill(255);
	ellipse(50, 65, 69, 50); 

	// ears
	ellipse(30, 37, 25, 55); 
	ellipse(70, 33, 23, 55);

	// eyes
	fill(51, 51, 51);
	ellipse(38, 60, 5, 5); 
	ellipse(62, 60, 5, 5);

    //  nose
    ellipse(50, 70, 6, 6) 

	// cheeks
	fill(246, 202, 201);
	ellipse(30, 69, 13, 8); 
	ellipse(70, 69, 13, 8);

	// mouth
	strokeWeight(2);
	noFill();
	stroke(51, 51, 51); 
	curve(50, 30, 50, 70, 40, 75, 40, 60);
	curve(50, 30, 50, 70, 60, 75, 60, 60);
}

function bear(x,y) {
	// head
	noStroke();
	fill(225, 189, 152);
	ellipse(50, 60, 68, 58);

	// ears
	ellipse(25, 35, 24, 24); 
	ellipse(75, 35, 26, 29);

	// cheeks
	fill(239, 163, 163);
	ellipse(30, 65, 13, 8); 
	ellipse(70, 65, 13, 8);

	// eyes
	fill(51, 51, 51);
	ellipse(37, 55, 5, 5); 
	ellipse(63, 55, 5, 5);

    // nose
    ellipse(50, 65, 6, 6); 

    // mouth
    strokeWeight(2);
	noFill();
	stroke(51, 51, 51);
    line(50, 65, 50, 72); 
	curve(45, 60, 45, 71, 55, 71, 55, 60);
}

function carrot(x,y) {
	//leaf1
	noStroke();
	fill(165, 209, 117); 
	ellipse(50, 38, 9, 20); 
	
	// leaf2
	push();
	translate(57, 38);
	rotate(radians(30));
	ellipse(0, 0, 9, 23);
	pop();

	//leaf3
	push(); 
	translate(43, 38);
	rotate(radians(-30));
	ellipse(0, 0, 9, 23);
	pop();


	// carrot body
	fill(253, 195, 117);
	ellipse(50, 60, 17, 35); 
}

function fish(x,y) {
	// body
	noStroke();
	fill(74, 98, 168); 
	ellipse(46, 50, 38, 18); 
	push();

    // back fin 1
    translate(63, 54); 
    rotate(radians(17));
	ellipse(0, 0, 23, 9);
	pop();

    // back fin 2
	push();
	translate(63, 46); 
    rotate(radians(-17));
	ellipse(0, 0, 23, 9);
	pop();

    // eye
	fill(0); 
	ellipse(37, 47, 3, 3); 

    // side fin
	fill(58, 78, 155); 
	ellipse(48, 53, 15, 7)
}

To start, I “sketched” out each animal, as well as the pattern, in illustrator, and coded from there:

Project-05-Wallpaper

I was inspired by one of my favorite prints-cow print, and a fruit I love- cherries. Additionally, when you click on the image, the background will change.

graanak-05
//Graana Khan
//Section B
//graanak@andrew.cmu.edu
//Project-05

function setup() {
    createCanvas(400, 400);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
	
	//cow print backdrop 

	background(255);
	noStroke();
	fill(0);
	beginShape();
	curveVertex(40, 45);
	curveVertex(40, 45);
	curveVertex(46, 35);
	curveVertex(76, 26);
	curveVertex(139, 78);
	curveVertex(66, 141);
	curveVertex(36, 123);
	curveVertex(47, 83);
	curveVertex(47, 83);
	endShape();
	beginShape();
	curveVertex(180, 32);
	curveVertex(180, 32);
	curveVertex(197, 19);
	curveVertex(249, 23);
	curveVertex(255, 62);
	curveVertex(232, 62);
	curveVertex(232, 62);
	endShape();
	beginShape();
	curveVertex(276, 45);
	curveVertex(276, 45);
	curveVertex(307, 23);
	curveVertex(361, 26);
	curveVertex(375, 89);
	curveVertex(369, 126);
	curveVertex(318, 141);
	curveVertex(282, 82);
	curveVertex(282, 82);
	endShape();
	beginShape();
	curveVertex(156, 141);
	curveVertex(156, 141);
	curveVertex(152, 120);
	curveVertex(196, 82);
	curveVertex(256, 117);
	curveVertex(316, 197);
	curveVertex(259, 220);
	curveVertex(176, 187);
	curveVertex(176, 187);
	endShape();
	beginShape();;
	curveVertex(344, 182);
	curveVertex(344, 182);
	curveVertex(355, 199);
	curveVertex(355, 231);
	curveVertex(331, 196);
	curveVertex(331, 196);
	endShape();
	beginShape();
	curveVertex(83, 172);
	curveVertex(83, 172);
	curveVertex(56, 170);
	curveVertex(44, 200);
	curveVertex(52, 210);
	curveVertex(87, 200);
	curveVertex(87, 200);
	endShape();
	beginShape();
	curveVertex(168, 253);
	curveVertex(168, 253);
	curveVertex(175, 231);
	curveVertex(196, 228);
	curveVertex(218, 241);
	curveVertex(208, 273);
	curveVertex(180, 273);
	curveVertex(180, 273);
	endShape();
	beginShape();
	curveVertex(78, 253);
	curveVertex(78, 253);
	curveVertex(130, 247);
	curveVertex(180, 331);
	curveVertex(142, 369);
	curveVertex(78, 377);
	curveVertex(36, 317);
	curveVertex(36, 317);
	endShape();
	beginShape();
	curveVertex(250, 253);
	curveVertex(250, 253);
	curveVertex(311, 244);
	curveVertex(354, 259);
	curveVertex(369, 293);
	curveVertex(307, 321);
	curveVertex(237, 324);
	curveVertex(237, 324);
	endShape();
	beginShape();
	curveVertex(214, 341);
	curveVertex(214, 341);
	curveVertex(242, 345);
	curveVertex(248, 365);
	curveVertex(206, 377);
	curveVertex(195, 367);
	curveVertex(195, 367);
	endShape();
	beginShape();
	curveVertex(234, 400);
    curveVertex(234, 400);
    curveVertex(293, 349);
    curveVertex(369, 363);
    curveVertex(388, 400);
    curveVertex(388, 400);
    endShape();
    beginShape();
    curveVertex(23, 348);
    curveVertex(23, 348);
    curveVertex(44, 362);
    curveVertex(52, 388);
    curveVertex(10, 384);
    curveVertex(5, 374);
    curveVertex(5, 374);
    endShape();

    //red cherry columns 

    for(var x = -10; x <= 340; x += 100){
    	for(var y = -60; y <= 372; y += 80){
    		push();
    		translate(x,y);
    		rotate(radians(-15));
    		cherries();
    		pop();
    	}
    }


    // pink cherry columnns

    for(var x = 60; x <= 293; x += 100){
    	for(var y = 45; y <= 352; y += 80){
    		push();
    		translate(x,y);
    		rotate(radians(15));
    		pinkcherries();
    		pop();
    	}
    }
    noLoop();
}

function mousePressed(){
    background(213, 238, 247);
    for(var x = 0; x <= 360; x += 145){
        for(var y = 0; y <= 360; y += 105){
        	push();
        	translate(x,y);
        	clouds1();
        	pop();
    		
    	}
    }

    for(var x = 0; x <= 260; x += 145){
    	for(var y = 0; y <= 260; y += 105){
    		push();
    		translate(x,y);
    		clouds2();
    		pop();
    	}
    }

    //red cherry columns 

    for(var x = -10; x <= 340; x += 100){
    	for(var y = -60; y <= 372; y += 80){
    		push();
    		translate(x,y);
    		rotate(radians(-15));
    		cherries();
    		pop();
    	}
    }


    // pink cherry columnns

    for(var x = 60; x <= 293; x += 100){
    	for(var y = 45; y <= 352; y += 80){
    		push();
    		translate(x,y);
    		rotate(radians(15));
    		pinkcherries();
    		pop();
    	}
    }
    noLoop();    
}

//cherries pattern

function cherries(){

	//stems
	stroke(61, 130, 48);
	strokeWeight(2);
	line(35, 40, 44, 22);
	line(53, 40, 44, 22);
	
	//leaf
	noStroke();
	fill(61, 130, 48);
	beginShape();
	curveVertex(44, 22);
	curveVertex(44, 22);
	curveVertex(46, 19);
	curveVertex(50, 19);
	curveVertex(47, 22);
	curveVertex(47, 22);
	endShape();

	//cherry
	noStroke();
	fill(229, 14, 14);
	circle(35, 44, 15);
	circle(52, 44, 15);

}

function pinkcherries(){

	//stems
	stroke(61, 130, 48);
	strokeWeight(2);
	line(35, 40, 44, 22);
	line(53, 40, 44, 22);
	
	//leaf
	noStroke();
	fill(61, 130, 48);
	beginShape();
	curveVertex(44, 22);
	curveVertex(44, 22);
	curveVertex(46, 19);
	curveVertex(50, 19);
	curveVertex(47, 22);
	curveVertex(47, 22);
	endShape();

	//cherry
	noStroke();
	fill(255, 199, 227);
	circle(35, 44, 15);
	circle(52, 44, 15);

}


//clouds1 pattern 
function clouds1(){
	noStroke();
	fill(255);
	rect(21, 23, 51, 28, 30);
	rect(51, 40, 38, 18, 15);
}

//clouds2 pattern 
function clouds2(){
	noStroke();
	fill(255);
	rect(106, 76, 60, 24, 20);
	rect(103, 89, 33, 24, 10);
}

Project 05- Wallpaper

I really like bubble tea, so I created this homage to the drink It was difficult for me to coordinate and organize the spacing in between the different drinks, especially taking into consideration the scaling factor.

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

function draw() {
  background(255, 224, 226);
//mint stripes
  for (var m = 0; m < width; m+=90){
    push();
    translate(0, m-275)
    strokeWeight(7);
      stroke(202, 230, 225)
      line(0,0,width, height)
    pop();
}
//blue bubble tea cups
    for (var i= 0; i < width-60; i+=100){
    push();  
  	translate(i, 0);
  
      for(var j = 20; j< height; j += 50){
        push();
        translate(0, (j*3)-90);
        rotate(PI/8)
        stroke(134, 164, 219)
  		strokeWeight(5)
  noFill();
  //bubble tea cap
  ellipse(122, 30, 40,15);
  //bubble tea cup
      line(100,30,110,80);
      line(144, 30, 135,80);
      line(134,80,110,80);
  //straw
  stroke(65, 95, 150)
  strokeWeight(7);
  	line(122, 15,122, 70)
  //tapioca balls
  stroke(0)
  strokeWeight(6);
    point(132, 70);
    point(127, 67);
    point(114, 66);
    point(115, 74);
    point(122, 69);
    point(127, 74);
    pop();
  }
    pop();
    }
  
  //mango green tea cups
      for (var a= 0; a < width-60; a+=100){
    	push();
  			translate(a-50, 0);
      for(var c = 0; c< height; c += 50){
      push();
        translate(30, (c*3));
        rotate(-PI/8)
        scale(0.5)
          stroke(179, 139, 104)
          strokeWeight(5)
        noFill();
          ellipse(122, 30, 40,15);
            line(100,30,110,80);
            line(144, 30, 135,80);
            line(134,80,110,80);
      noStroke();
      fill(255, 195, 56)
        quad(107, 60, 135, 60, 135, 80, 107, 80);
      strokeWeight(7);
        line(122, 15,122, 70)
    pop();
    }
  pop();
  }
  noLoop();
}

Project 05: Wallpaper

project-05-wallpaper
/*
Lauren Kenny
lkenny
Section A

This program draws a repeating geometric pattern.

*/

var x;
var y;
var circleX;
var circleY;
var circleX2;
var circleY2;

function setup() {
    noLoop();
    createCanvas(600, 600);
    background(0);
    noStroke();
    x=50;
    y=50;
    w=100;
    h=100;
    circleX=20;
    circleY=20;
    circleX2=80;
    circleY2=80;
}

function draw() {
    drawGrid();
}

//////////////////////////////
// THIS CREATES THE CIRCLES
/////////////////////////////
function drawBottomLeft() {
    fill(255, 0, 0);
    arc(x, y, w, h, HALF_PI, PI);
    fill(255, 255, 0);
    arc(x, y, w-50, h-50, HALF_PI, PI);
}

function drawBottomRight() {
    fill(0, 255, 0);
    arc(x, y, w, h, 0, HALF_PI);
    fill(0, 0, 255);
    arc(x, y, w-50, h-50, 0, HALF_PI);
}

function drawTopLeft() {
    fill(0, 0, 255);
    arc(x, y, w, h, PI, PI+HALF_PI);
    fill(0, 255, 0);
    arc(x, y, w-50, h-50, PI, PI+HALF_PI);
}

function drawTopRight() {
    fill(255, 255, 0);
    arc(x, y, w, h, PI+HALF_PI, 0);
    fill(255, 0, 0);
    arc(x, y, w-50, h-50, PI+HALF_PI, 0);
}

//////////////////////////////
// THIS CREATES THE TINY DOTS
/////////////////////////////
function drawTopCircles() {
    fill(0, 255, 0);
    circle(circleX, circleY, 5);
    circle(circleX+5, circleY-5, 5);
    circle(circleX-5, circleY+5, 5);
}

function drawBottomCircles() {
    fill(0, 0, 255);
    circle(circleX2, circleY2, 5);
    circle(circleX2+5, circleY2-5, 5);
    circle(circleX2-5, circleY2+5, 5);
}

//////////////////////////////
// THIS DRAWS THE REPEATING PATTERN
/////////////////////////////
function drawGrid() {
    //PURPLE DOTS IN BACKGROUND
    var d=5;
    var e=5;
    for (var o=0; o<width; o+=10) {
        for (var p=0; p<height; p+=10) {
            fill(80, 0, 195);
            ellipse(d, e, 8);
            e+=10;
        }
        e=5;
        d+=10;
    }

    //LARGE CIRCLES
    for (var i=0; i<width; i+=100) {
        for (var j=0; j<height; j+=100) {
            drawBottomRight();
            drawBottomLeft();
            drawTopLeft();
            drawTopRight();
            y+=100;
        }
        y=50;
        x+=100;
    }

    //WHITE OUTLINED CIRCLES IN FRONT
    var f=5;
    var g=5;
    for (var q=0; q<width; q+=10) {
        for (var r=0; r<height; r+=10) {
            noFill();
            stroke(255);
            strokeWeight(.35);
            ellipse(f, g, 10);
            g+=10;
        }
        g=5;
        f+=10;
    }

    //TINY GREEN DOTS
    var greenCounter=0;
    for (var k=0; k<width; k+=100) {
        greenCounter+=1;
        if (greenCounter%2==0) {
           circleY=120; 
        } 
        else {
            circleY=20;
        }
        for (var l=0; l<height; l+=200) {
            drawTopCircles();
            circleY+=200;
        }
        circleX+=100;
    }

    //TINY BLUE DOTS
    var blueCounter=0;
    for (var m=0; m<width; m+=100) {
        blueCounter+=1;
        if (blueCounter%2==0) {
            circleY2=80;
        }
        else {
            circleY2=180;
        }
        for (var n=0; n<height; n+=200) {
            drawBottomCircles();
            circleY2+=200;
        }
        circleX2+=100;
    }
}




I wanted to experiment with a geometric pattern and the arc() function we learned this week. I’ve been trying to get myself back up to speed with the unit circle, so I challenged myself to try and get the angles right on the first try rather than trial and error like I normally do. I found that when I really thought through the math and logic first, it was easier to write the program. I also wanted to experiment with some conditionals in my loops. After making my intended pattern, I added some extra loops just to give the visual more dimension.

Project 05 – Wallpaper

sketch.sl5Download
// Sarah Luongo
// sluongo
// Section A

function setup() {
    createCanvas(465, 465);
    background(84, 141, 155);
    noLoop();
}

function flower() {
    push();
    translate(74, 74);

    // Purple petals
    for (var i = 0; i < 4; i ++) {
        noStroke();
	fill(51, 0, 102);
	ellipse(0, -15, 15, 25);
	triangle(-6, -22.63, 6, -22.63, 0, -31);
	stroke(229, 204, 0);
	strokeWeight(1);
	line(0, -16, 0, -11);
	rotate(radians(90));
    }
    
    // Pink petals
    push();
    rotate(radians(45));
    for (var i = 0 ; i < 4; i ++) {
	noStroke();
	fill(255, 204, 204);
        ellipse(-20, 0, 40, 15);
	triangle(-34, -5.4, -34, 5.4, -45, 0);
	fill(0, 0, 255);
	circle(-9, 0, 2);
        rotate(radians(90));
    }
    pop();
    
    // Center of flower
    noStroke();
    fill(55, 24, 85);    
    circle(0, 0, 12);
    pop();
}

// Horizontal vines
function vinesH() {
    // Vines
    noFill();
    stroke(24, 129, 24);
    strokeWeight(2);
    bezier(1, 74, 15, 85, 25, 65, 40, 74);
    // Leaves
    noStroke();
    fill(24, 129, 24);
    ellipse(8, 72, 3, 9); // Left-most leaf
    ellipse(22, 79, 4, 10); // Center leaf
    ellipse(38, 69, 2, 7); // Right-most leaf
}

// Vertical vines
function vinesV() {
    // Vines
    noFill();         
    stroke(24, 129, 24);
    strokeWeight(2);                                    
    bezier(74, 1, 85, 15, 65, 25, 74, 40);
    // Leaves
    noStroke();
    fill(24, 129, 24);
    ellipse(72, 8, 9, 3); // Top-most leaf 
    ellipse(79, 22, 10, 4); // Center leaf
    ellipse(69, 38, 7, 2); // Bottom-most leaf
}

function draw() {
    for (var i = 0; i < 5; i++) {
        for(var j = 0; j < 5; j++) {
        push();
        translate(106*i, 106*j);
        vinesH();
        vinesV();
        flower();
        pop();
        }
    }
}

I wanted to do a floral pattern because I love flowers. I also really ran with the idea of creating something I would wear. I actually have a floral shirt with variations of pink flowers, and this is slightly based off of it. I normally draw flowers as I have created in this code (which you can see from the sketch below), and I wanted the multiple petals to make them all different colors. However, the colors I chose were different from the sketch because I didn’t have many pen options on my tablet, if I did they would have been the colors I choose in this code as they are all colors I love!

Project 05: Wallpaper

The biggest challenge in this project was dealing with drawing the spines on the cactus. It turns out P5.js doesn’t really like nested loops in functions and it crashed the program when I tried to use it, so I had to do the inefficient solution of manually drawing the points.

cactus







function setup() {
    createCanvas(600, 600);
    strokeWeight(3)
   
   


}

function draw() {
for (x = 120; x <= width - 120; x += 120) {
    
    for (y = 120; y <= height - 120; y += 120) {
        
        createCactus(x, y, 60, 80)
    }
}
    
  




}

function createCactus(cactusx, cactusy, cactusw, cactush) { 
    push()
    rotate(radians(random(-PI * 2, PI * 2)))
    translate(cactusx,cactusy) 
    fill(35, 117, 67)
    ellipse(0, 0, cactusw, cactush)
    body()
    arms(45)
    flower()
    pop()
    noLoop()
    



}

function body() {
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      point((random(-20, 20)), random(-30, 30))
      noLoop()


}

function arms (x) {
    push()
    translate(x,0)
    rotate(degrees(90))
    ellipse(0, 0, 20, 40)
    pop()
    push()
    translate(-x,0)
    rotate(degrees(230))
    ellipse(0, 0, 20, 40)
    pop()
    }

function flower() {
        noStroke()
        push()
        translate(0, -40)
        for (r = 90; r <= 270; r += 180) {
            rotate(degrees(r))
            fill(245, 110, 191)
            ellipse(0, 0, 10, 20)
            
        }

        pop()    
    }



    //// for (x = 0; x <= cactusw/2.75; x += 10) {
        //for (y = 0; y <= cactush/2.25; y += 10) {
             //point(x,y)
            
        //}
    //}
    ///for (x = -(cactusw/3); x <= 0; x += 10) {
        ///for (y = 0; y <= cactush/2.25; y += 10) {
             //point(x,y)
            
        //}
    //}
    //for (x = -(cactusw/3); x <= 0; x += 10) {
        //for (y = (-cactush/2.75); y <= 0; y += 10) {
             //point(x,y)
            
        //}
    //}
    //for (x = 0; x <= cactusw/2.75; x += 10) {
        //for (y = (-cactush/2.75); y <= 0; y += 10) {
             //point(x,y)
            
        //}
    //}

Wall paper

sketch
var s = 70;
var x = 50;
var y = 0;


function setup() {
  createCanvas(550, 500);
}

function draw() {
  background(250);
  drawGrid();
  noLoop();
}

function drawGrid(){
    push();
    translate(x,y);                                     //background circles
        for (var i = 0; i < 8*s; i += s) {
            for (var j = 0; j <= 8*s; j += 15) {
                noStroke();
                fill(38,56,71);
                circle(i, j,5);
            }
        }
    translate(0,y);                                     //Odd column trees
        for( var q =0;q <7*s; q += s*2){
            for(var a =0; a <=500; a +=136){
                fill(55,83,102);
                stroke(55,83,102);
                shape(q-50,a);
            }
        }
    translate(70,s);                                  //Even column trees
        for( var q =0;q <7*s; q += s*2){
            for(var a =0; a <=500; a +=136){
                fill(35,52,61);
                stroke(35,52,61);
                shape(q-50,a);
            }
        }
    translate(-50,-68);                               //Red Diagonal lines
        for(var r =-70; r <=1000; r+= 140){
            stroke(163,69,89);
            strokeWeight(7);
            line(r,0,-500*(r/2),550*(r*0.45));    
        }
    translate(-500,0);                                //Beige Diagonal lines
        for(var r =-520; r <=1000; r+= 140){
            stroke(232,186,177);
            strokeWeight(2);
            line(r-100,0,250*r,500*(r*0.45));    
        }
    pop();
}

function shape(x,y) {
    push();
    translate(x,y);         //trees
    beginShape();
    vertex(50,0);
    vertex(34,21);
    vertex(39,24);
    vertex(30,28);
    vertex(38,32);
    vertex(25,38);
    vertex(34,41);
    vertex(22,48);
    vertex(47,48);
    vertex(47,61);
    vertex(52,61);
    vertex(52,48);
    vertex(78,48);
    vertex(64,41);
    vertex(73,37);
    vertex(63,31);
    vertex(69,28);
    vertex(57,23);
    vertex(64,20);
    vertex(50,0);
    endShape(CLOSE);
    push();
    fill(255);              //white circles
    circle(55,17,2);
    circle(52,21,3);
    circle(46,24,2);
    circle(39,28,4);
    circle(44,31,2);
    circle(53,34,3);
    circle(58,36,2);
    circle(66,38,3);
    circle(61,43,4);
    circle(54,44,3);
    circle(45,46,3);
    circle(39,46,2);
    circle(32,46,3);
    pop();
    pop();
}

Because Christmas season is coming soon, I wanted to create something related with Christmas. First thing that pop up in my head was Christmas trees with colors of red, green, and white.

illustrator Iteration
Idea sketch

Project 5 Wallpaper

Continuing my exploration of abstracting puritst paintings of the architect Le Corbusier/ Charles Edouard Jeanneret. This week I decided to attempt to re-interpret some of the common motifs that occur in his paintings into the wall paper assignment. Purists paintings and cubist paintings alike require often require subtle differences in their repetitions of geometry to achieve their ambiguous depth and transparency, so reinterpreting them into a wall paper which inherently a tiled seamless graphic proved to be a difficult task.

sketch
//tjchen
//section A
function setup() {
    createCanvas(600, 600);
    background(220);
}

function draw() {
    scale(1);
    for ( var row = 0; row <= height; row += 80){
        for(var col = 0; col <= width; col += 80){
            tilebigger1(col,row);
        }
    }
    for ( var row = 40; row <= height; row += 80){
        for(var col = 0; col <= width; col += 80){
            tilebigger2(col,row);
        }
    }
}

function tilebigger1(x,y){
    tile(x,y);
    push()
    translate(20,20);
    rotate(radians(180));
    //translate(x+40,y);
    tile(-x-60,-y-20);
    pop();
}
//second row type
function tilebigger2(x,y){
    push()
    translate(20,20);
    rotate(radians(180));
    //translate(x+40,y);
    tile(-x-20,-y-20);
    pop();
    tile(x+40,y);
}
    


function tile(x,y){
    noStroke();
    push();
    translate(x,y);
    //background 
    fill(146, 195, 234);
    square(0,0,40);
    //midground
    fill(88, 96, 105);
    rect(0,0,40,15);
    //women/bull/violin
    strokeWeight(1);
    stroke(0);
    fill(253, 223, 186);
    beginShape();
    curveVertex(40,0);
    curveVertex(40,0);
    curveVertex(23.9,4.56);
    curveVertex(21.62,10.8);
    curveVertex(24.7,16.55);
    curveVertex(32.69,16.29);
    curveVertex(35.72,23.64);
    curveVertex(31.37,27.76);
    curveVertex(23.89,29.92);
    curveVertex(22.41,36.07);
    curveVertex(29.58,39.75);
    curveVertex(40,40);
    curveVertex(40,40);
    endShape();
    //eyes
    noFill();
    strokeWeight(1);
    stroke(0);
    rectMode(CENTER);
    rect(26.18,9.83,3,5,2);
    rect(26.64,33.83,3,5,2);
    //nose bottle
    rectMode(CORNER);
    noStroke();
    fill(86, 122, 183);
    rect(3.5,18.5,15,22);
    fill(255);
    rectMode(CENTER);
    strokeWeight(1);
    stroke(0);
    rect(11,20,15,8,4);
    fill(183, 52, 9);
    noStroke();
    circle(8.5,20,3);
    circle(13.5,20,3);
    //guitar middle 
    noFill();
    strokeWeight(1);
    stroke(0);
    arc(40,20,15,15,HALF_PI,PI+HALF_PI,OPEN);
    pop();
}

Project-05- Wallpaper

sketchDownload

//Shruti Prasanth
//Section C
//Project 5- Wallpaper

function setup() {
    createCanvas(500, 500);
    background (243,239,201);
}

function draw() {
    rectMode(CENTER);
    //flower starts at canvas top left corner, and translates from the previous position:
    flower(0, 0);
    flower(150,0);
    flower(150,0);
    flower(150,0);
    flower(-75,150);
    flower(-150,0);
    flower(-150,0);
    flower(-150,0);
    flower(-75,150);
    flower(150,0);
    flower(150,0);
    flower(150,0);
    flower(150,0);
    flower(75,150);
    flower(-150,0);
    flower(-150,0);
    flower(-150,0);
    flower(-150,0);

}

function flower(x,y) {
    push();
    translate(x,y);

    noStroke();
    fill(215,210,143);
    //diam= 50
    circle(width/10, height/10, 50); 
    fill(255);
    circle(width/10, height/10, 10);
    push();
    translate(width/10, height/10);
    fill(255);

    //inbetween big circle and ellipse dots
    circle(-55,-100,10);
    circle(55,-100,10);
    circle(55,100,10);
    circle(-55,100,10);
    circle(-100,-18,10);
    circle(100,-18,10);
    circle(-100,18,10);
    circle(100,18,10);


    circle(0,-30,20);//inner white circles
    circle(0,30,20);
    circle(30,0,20);
    circle(-30,0,20);
    circle(-20,20,20);
    circle(20,20,20);
    circle(20,-20,20);
    circle(-20,-20,20);
    ellipse(0,70,20,50);
    ellipse(0,-70,20,50);
    ellipse(70,0,50,20); //right long petal
    ellipse(-70,0,50,20);
    circle(45,45,30); //bigger outer circle
    circle(45,-45,30);
    circle(-45,-45,30);
    circle(-45,45,30);
    pop();

}







For my coded wallpaper, I was inspired by the queen annes lace flower, and I decided to abstract the petals into a vector design version. I used a lot of ellipses and circles of varying sizes, and based it off a light green + white color scheme. This wallpaper might be something I would wear possibly on a printed dress.

Project 5 – Groovy Wallpaper

It seems in my experience, wallpaper gets a bad reputation. One quick search of “interior design” on Pinterest will reveal the modern day obsession with sleek and minimal aesthetic choices. In the face of this, I chose to design a wallpaper that riffs off of aesthetic choices perhaps equally as brawny – inspired by the loud colors of post modernism.

sketchDownload
// JUBBIES STEINWEH-ADLER
// PROJECT 05 - GROOVY WALLPAPER
// SECTION D

//GLOBAL VALUES
x = 0;
y = -150;// initial y value off canvas to create seamless pattern
d = 0; // arrow direction ( 1 = left 0 = right )

function setup() {
  createCanvas(500, 400);
  background(250, 240, 220);
  blendMode(MULTIPLY); // color blend mode multiplies rgb value of overlapping colors
}

function draw() {
    //ROW PROPERTIES
  for(var loop = 0; loop < 5; loop +=1) { // number of total rows limited to 5
     if (d == 0) { //switching direction for each loop
     d = 1; //left arrows
    } else {
     d = 0; //right arrows
 }
        //TRIANGLE PROPERTIES
         for(var row = 0; row < 1; row +=1) {  // triangle x-offset and tracking
               x = -120; // initial x value for the first triangle
               y += 110; // vertical spacing, tracking
       
            for(var rep = 0; rep < 7; rep +=1) { 
            x += 120; // distance between each module (width)
            stack(d, x, y); 
       }
     }
  }
  noLoop(); //disables automatic looping from draw function
}

// TRIANGLE PACKAGE - Grouped for single 'anchor point'
function stack(d, x, y) { 
  push();
  translate(x, y);  // translate by determined x and y value
  module(d); // draw a single triangle module
  pop();
}

//TRIANGLE MODULE DRAW COMMAND
function module(d) {
  noStroke();
  var r = 180; //red value
  var g = 40;  //green value
  var b = 190; //blue value


    //RIGHT ARROW MODULE
        if (d == 0){ 
         px = 0; //linked X coordinate
         py = 0; //linked y coordinate
  
        //vertical leg
        fill(r, g, b);
        push();
        translate(px, py);
        rect(0, 0, 50, 170, 70);
        pop();

        //top angled leg
        fill(g, b, r);
        push();
        translate(px-10, py+35);
        rotate(radians(300));
        rect(0, 0, 50, 170, 70);
        pop();


        //bottom angled leg
        fill(b, r, g);
        push();
        translate(px+15, py+180);
        rotate(radians(240));
        rect(0, 0, 50, 170, 70);
        pop();
  
    //LEFT ARROW MODULE
    } else if (d == 1) { 
        
        fill(r, g, b);
        ptO = 60; // OFFSET VALUE TO ALTERNATE ROW START POSITION 
        ptT = 0;
  
        //vertical leg
        push();
        translate(ptO, ptT);
        rect(0, 0, 50, 170, 70);
        pop();
  
        //top leg
        fill(g, b, r);
        push();
        translate(ptO +35, ptT - 10);
        rotate(radians(60));
        rect(0, 0, 50, 170, 70);
        pop();
  
        //bottom leg
        fill(b, r, g);
        push();
        translate(ptO + 60, ptT + 135);
        rotate(radians(120));
        rect(0, 0, 50, 170, 70);
        pop();
  }    

}

For the actual pattern shape, I was inspired by this pattern I found on the internet. I really enjoyed how the colors interacted where the shapes overlapped. This pushed me to discover that p5.js has blending modes. Using multiply blending mode and adjusting the opacity is how I got my final result.