serinal- project 5 (section C)

sketch

function setup() {
    createCanvas(640, 480);
    background(224, 255, 255);

 	var constant = (sqrt(3)/2)*20; // value for the width
    var row = 8;
    var w = 65; //spacing
    var th = constant;
    var oy = 10; // original y
    var ox = 2; // original x

    for (var y = 0; y < 8; y++) {
        for (var x = 0; x < row; x++) {
            var py = oy + y * th;
            var px = ox + x * w;
            if (y%2 == 0){
            	noStroke();
            	fill (112, 128, 144);
            	rect(px+w*0.3, py*8, 10, 10); //smaller rectangles (top n bottom)
            	row = 10; 
            } else {
            	noStroke();
            	fill (176, 192, 222);
            	rect(px, py+119, 50, 50); //larger rectangle in middle
            	row = 10;
            }
        }
    }
    noLoop();
}

function draw(){
	for (var i =0; i<800+40; i+=30) {
		stroke (30, 144, 225);
		strokeWeight (2);
    	line(i-2, 35, i+5, 40); //shorter line top
    	line (i-2, 35, i+5, 50); //longer line bottom
    	stroke (245, 255, 250, 80);
    	line (2, 3*i, 5*i, 1);
    	stroke (30, 144, 225);
    	strokeWeight (2);
    	translate (-5, 0);
    	line (i+40, 400, i+25, 405);
    	line (i+40, 400, i+25, 420);
    }
}

This project was pretty low-key for me and I wanted to keep my project mostly geometric/basic. I liked playing around with the colors and I chose to do a blue-guided color palette. If I had more time, I definitely would want to make it a little more complex.

JDBROWN – Project 5 – Textile Pattern

For this project, I took inspiration from the color gradient lab that we did on Tuesday. I wanted to experiment with more textured shapes than I had been using previously, and I think this turned out really interesting.

Jdbrown Proj 5

// Joshua Brown
// Jdbrown@andrew.cmu.edu
// Section C
// Project 5: Wallpaper

var i = 0;
var fuck = 150;
var shit = 50;
var flash = 10;

function setup () {
    createCanvas (600, 480);
    stroke (255);
    strokeWeight (3);
}

function draw () {

    background (255);
 
    for (var y = 50; y < height + 50; y += 100) {
        rect (x + 50, y - 25, 50, 50);
        
        for (var x = 50; x < width + 50; x += 100) {
            fill (y/2, x/2, 0, x*y);
            ellipse(x - 25, y - 10, 25, 150);   // vertical grid
            ellipse(x - 25, y - 10, 50, 50);    // big circles at each nexus point
            ellipse(x + 25, y + 45, 20, 20);    // little dot in the center of each square
            ellipse(x, y, 30, 30);              // lower bump
            ellipse(x - 25, y - 10, 30, 30);    // lower bump
            ellipse(x - 10, y - 10, 35, 35);    // bee body (big)
            ellipse(x - 10, y - 10, 115, 15);   // horizontal grid
            ellipse(x - 25, y - 10, 25, 25);    // central circle
        }
    }

    for (var y = 0; y < height+25; y += 50) {       // Draws columns (just Y)
        for (var x = 0; x < width+25; x += 50) {    // Draws rows (just X)
            fill(150, 200);
            ellipse(x + 1000, y, 25, 25);
        }
    }
    for (var  x = 5; x < width + 25; x += 10) {
        for (var y = 5; y < height + 25; y += 10) {
        fill(255, 120);
        ellipse(x, y, 5, 5);
        }
    }
}

Lrospigl – Pattern Week 05

I wanted to make something simple and cute that would allow for a bit of an unnaturalness to it too. By putting the smile and adding random circles around it, it creates this uneasiness.

Lrospigl Sketch

//Laura Rospigliosi
//Section C
//lrospigl@andrew.cmu.edu
//Project-04-String art

var distw = 50; // x spacing
var disth = 50; // y spacing
var circlex = 25; // x start
var circley = 25; // y start
var circle = 10; // number of circles per row
var c = (230, 180, 230);
var angle = 1;

function setup() {
    createCanvas(450,450);
}

function draw() {
    background(250);

    for (var row = 0; row < 9; row++) {
        if (row % 2 ===1){
            circlex +=25; //spacing of odd rows + start
            circle = 8; // number of circles

        }
        else {
            circlex = 25; //start of circles
            circle = 9; //
        }
        for (var col = 0; col < circle; col++) {
            var cx = 0;
            var cy = row * disth;
            lines (cx, cy);
        }

    for (var col = 0; col < circle; col++) {
        var px = circlex + col * distw;
        var py = circley + row * disth;
        smiley (px, py);
        }
    noLoop();
}
}

function lines(cx, cy) {
    push();
    translate (cx, cy);
    strokeWeight (10)
    stroke (100, 100, 200);
    curve (0, 0, 0, 0, 450, 10, 450, 0, 450, 0);
    pop();
}

function smiley(px, py) {
    push();
    stroke (0)
    translate(px, py);
    fill(255, 255, 0);
    ellipse (0, 0, 40, 40);
    fill (0);
    ellipse (-6,-5, 5, 5);
    ellipse (6, -5, 5, 5);
    fill (c);
    arc(0, 3, 20, 20, 0, PI);
    noFill ();
    ellipse (-2, 0, 41, 40);
    ellipse (2, 0, 40, 39);

    pop();
}

ifv-Project05-Wallpaper

sketch

//Isabelle Vincent
//Section E
//ifv@andrew.cmu.edu
//ifv-05-Project
function setup() {
    createCanvas(480, 480);
    background(140, 184, 135);
}

function draw() {
//curves
for (var countz = width/50; countz < width; countz += width/5){
for (var x = 0; x < width; x = x + 1) {
    stroke(163, 214, 157);
    fill(163, 214, 157);
    strokeWeight(2);
    point((60 - 50 * 0.5*sin(radians(2*x)))+countz,x);
    point( (60 - 50 * 0.5*cos(radians(2*x)))+countz,x);
  }
}
//line of dots
for(var dotx = 0; dotx < width+10; dotx += 10){
  for(var doty = 0; doty < (4*height)/3; doty += height/3){
    if((dotx/10)%2==0){
      stroke(90, 143, 85);
      fill(90, 143, 85);
      strokeWeight(4);
    } else{
      stroke(163, 214, 157);
      fill(163, 214, 157);
      strokeWeight(2);
    }
    point(dotx,doty);
    point(dotx,doty+height/6);
  }

}
//Flowers
for(var fly =0; fly <height; fly += height/3){

for(var elc =0; elc< width; elc +=width/7){
  var ely = fly+height/10;
  var space = width/14;
  fill(255, 186, 171);
  noStroke();
  triangle((elc-5),ely,(elc),ely-20,(elc+5),ely)


  stroke(83, 131, 78);
  strokeWeight(3);
  noFill();
  triangle((elc-10),ely-8,(elc),ely,(elc-5),ely);
  triangle((elc+10),ely-8,(elc),ely,(elc+5),ely);
  elc += space
}

}
noLoop();
}

This was my initial sketch for the wall paper design, it was inspired by the wallpapers in the database that was linked. I decided to add a more organically shaped space divider with cos and sin loops. I kept the idea to include a representation of a plant just changed what the plant looked like.

rfarn-Project-05-wallpaper

Before beginning to code my wallpaper, I looked around online for inspiration. A lot of the online patterns I found incorporated organic and complex shapes. For my wallpaper, I wanted to focus on the use of for loops and repetition of simple shapes. I made a few rough sketches to help visualize what I needed to code.

I decided to use the last thumbnail sketch as a basis for my actual coded wallpaper design. After coding the shapes, I then went and played around with different colors.

sketch

function setup() {
    createCanvas(480, 480);
    background(121, 128, 113);

    //creating circular pattern
    var cdiam = width/5; //diameter of circles
    var spacex = 3 * cdiam / 4; //space between in x direction
    var spacey = 4 * cdiam / 3; //space between in y direction
    var ox = (width - (spacex * 6))/2; //x position
    var oy1 = (height - (spacey * 3))/2; //y position for every odd column
    var oy2 = oy1 - 2 * cdiam / 3; //y position for every other column

    for(var x = 0; x < 7; x++){ 

        var posx = ox + x * spacex; //x position consistent

        if(x % 2 == 1){
            for(var y = 0; y < 4; y++){ //4 circles
                fill(210, 213, 221);
                strokeWeight(10);
                stroke(153, 154, 198);

                var posy1 = oy1 + y * spacey; //y position of odd columns

                ellipse(posx, posy1, cdiam, cdiam);
            }
        } else {
            for(var y = 0; y < 5; y++){ //5 circles
                fill(184, 186, 207);
                strokeWeight(10);
                stroke(153, 154, 198);

                var posy2 = oy2 + y * spacey; //y position of even columns

                ellipse(posx, posy2, cdiam, cdiam);
            }
        }
    }

    //creating line pattern
    var lineox = ox + spacex/2; //original x position of lines
    var lineoy = oy1 - spacey/4; //original y position of lines

    for(var xline = 0; xline < 6; xline++){ // 6 vertical lines
        strokeWeight(5);
        stroke(232, 235, 228);

        var posVline = lineox + spacex * xline; // position of vertical lines

        line(posVline, 0, posVline, height);
    }

    for(var yline = 0; yline < 8; yline++){ // 8 horizontal lines
        strokeWeight(5);
        stroke(232, 235, 228);

        var posHline = lineoy + spacey/2 * yline; //position of horizontal lines

        line(0, posHline, width, posHline);
    }

    //creatings dots
    for(var dotsx = 0; dotsx < 6; dotsx++){
        for(var dotsy = 0; dotsy < 8; dotsy++){

            var posxdots = lineox + spacex * dotsx; //position of dots in x direction
            var posydots = lineoy + spacey/2 * dotsy; //position of dots in y direction

            noStroke();
            fill(121, 128, 113);
            ellipse(posxdots, posydots, 15, 15);
        }
    }

    noLoop();
}

function draw(){

}

sijings-project05-wallpaper

sijings-wallpaper

var topSw1=14;//for house roof, x axis
var topSw2=5;//for house's left wall, x axis
var topSw3=23;//for house's right wall, x axis
var topSw=30;//for houseRoof's weight
var topSh1=0;//for house roof, y axis
var topSh2=5;//for house's left and right wall, y axis
var topSh=25;//for houseRoof's height
var numofRow1=15;//for defining numbers of loop
var numofCol1=20;
var locFx=14;//for flower's x axis
var locFy=20;//for flower's y axis
var locYc=30;//flower's height in between
var locXc=1.25;//flower's weight
var flowerW=11;//flower's petal's size


function setup() {
    createCanvas(480, 455);
}
   
function draw() {
    scale(1.3);
    background(255);
    var r1=230;
    var b1=138;
    var g1=92;
    for (var row1=0; row1<numofRow1;row1++){
        for (var col1=0; col1<numofCol1;col1++){
            noStroke();
            r1=r1+0.2;//for gradiant color
            b1=b1+0.3;
            g1=g1+0.3;
            fill(r1,b1,g1);
            if (row1%2!=0){//for setting the condition 
                topSw1=30;//shifting between rows constantly
            }else{
                topSw1=15;

            }
            var x1=topSw1+col1*topSw;
            var y1=topSh1+row1*topSh-10;//based on calculation for eight points
            var x2=topSw1+col1*topSw+15;
            var y2=topSh1+row1*topSh;
            var x3=topSw1+col1*topSw;
            var y3=topSh1+row1*topSh+10;
            var x4=topSw1+col1*topSw-15;
            var y4=topSh1+row1*topSh;
            quad(x1,y1,x2,y2,x3,y3,x4,y4)
        
        }
    }
    var r2=225;//color variable for the walls
    var b2=205;
    var g2=203;
    var r3=240;
    var b3=240;
    var g3=240;

    for (var row2=0; row2<numofRow1;row2++){
        for (var col2=0; col2<numofCol1;col2++){
            noStroke();
            r2=r2+0.2;//changing varaibles for the color
            b2=b2+0.1;
            g2=g2+0.1;
            fill(r2,b2,g2);
            if (row2%2!=0){//for changing positions
                topSw2=20.5;
                topSw3=39;

            }else{
                topSw2=5;
                topSh2=5;
                topSw3=23;
            }
            var x11=topSw2+col2*topSw-5;//for setting up the eight points
            var y11=topSh2+row2*topSh-5;
            var x21=topSw2+col2*topSw+10;
            var y21=topSh2+row2*topSh+5;
            var x31=topSw2+col2*topSw+10;
            var y31=topSh2+row2*topSh+20;
            var x41=topSw2+col2*topSw-5;
            var y41=topSh2+row2*topSh+10;
            quad(x11,y11,x21,y21,x31,y31,x41,y41);
            r3=r3-0.2;//for the second side wall
            b3=b3-0.1;
            g3=g3-0.1;
            fill(r3,b3,g3);

            var x12=topSw3+col2*topSw-9;//for setting up the eight points
            var y12=topSh2+row2*topSh+4;
            var x22=topSw3+col2*topSw+7;
            var y22=topSh2+row2*topSh-6;
            var x32=topSw3+col2*topSw+11;
            var y32=topSh2+row2*topSh+8;
            var x42=topSw3+col2*topSw-8;
            var y42=topSh2+row2*topSh+20;
            if (col2==numofCol1-1){
                x32=topSw3+col2*topSw+7;
                y32=topSh2+row2*topSh+10;
            }
            quad(x12,y12,x22,y22,x32,y32,x42,y42);
            }
    }
    var r4=187;
    var g4=116;
    var b4=52;

    //green flower, flower roots, and door
    for (var row3=0; row3<numofRow1;row3++){
        for (var col3=0; col3<numofCol1;col3++){
            noStroke();
            fill(96,185,165);
            if (row3%2!=0){
                locFx=26;

            }else{
                locFx=10;
            }
            var e1=locFx+locYc*col3;
            var e2=locFy*locXc*row3;
            angleMode(DEGREES);//change radians to degree
            arc(e1, e2, flowerW, flowerW, -50, 10, PIE);
            arc(e1, e2, flowerW, flowerW, 35, 90, PIE);
            arc(e1, e2, flowerW, flowerW, 110, 155, PIE);
            arc(e1, e2, flowerW, flowerW, 175, 220, PIE);
            

            strokeWeight(1);
            stroke(87,148,83);
            noFill();
            curve(e1+30,e2+35,e1, e2, e1+7, e2, e1+15, e2+20);//the flower roots
            noStroke();
            
            //door and door handle
            r4+=0.2;
            g4+=0.2;
            b4+=0.2;
            fill(r4,g4,b4);
            if (row3%2!=0){
                topSw2=20.5;
                topSw3=39;
            }else{
                topSw2=5;
                topSh2=5;
                topSw3=23;
            }
            var x1=topSw2+col3*topSw;
            var y1=topSh2+row3*topSh+4;
            var x2=topSw2+col3*topSw+5;
            var y2=topSh2+row3*topSh+8;
            var x3=topSw2+col3*topSw+5;
            var y3=topSh2+row3*topSh+18;
            var x4=topSw2+col3*topSw-1;
            var y4=topSh2+row3*topSh+13;
            quad(x1,y1,x2,y2,x3,y3,x4,y4);
            fill(255);
            ellipse(x1+3,y1+8,3,3);

        }
    }
  
}

 

For this project, my inspiration came from the two-dimensional way of expressing three-dimensional object. The whole pattern is meant to be a set of houses with a plant living on top of it. The only problem I met was that I ignored the dimension I suppose to use for the project and used a much larger dimension. The actual pattern I created is larger than what I have now. Overall, I am happy about learning for loop, it makes my concept to another level.

agusman-Project05-Wallpaper

sketch

//Anna Gusman
//Section E
//agusman@andrew.cmu.edu
//Project O5 Wallpaper
//This sketch draws colorful, circular arcs

function setup() {
    createCanvas(400, 600); //set the boundaries
    frameRate(2); //control the framerate
    // var change = [1,2,3,4]; //make array

}

function draw() {
    background(0);
    strokeWeight(1.5); //set width of lines
    stroke(255);

    //creating a for loop
    //1. initialize variable
    //2. boolian test
    //3. incrementation operation
    //REMEMBER SEMI COLON IN BETWEEEEN

    for (var x = 0; x <= width; x += 50) {
      var choice;
      for (var y = 0; y <=height; y +=50) {
        // fill(0,0,255);
        var centerA; //x position of arc center
        var centerB; //y position of arc center
        var start; //starting position of arc

        //draw arcs starting from 4 different corners
        choice = int(random(1,5));
        if (choice == 1) { //top left corner
          //changing location of arc center and starting position
          centerA = x;
          centerB = y;
          start = 3 * PI / 2;
        }else if (choice == 2) { //top right corner
          //changing location of arc center and starting position
          centerA = x;
          centerB = y;
          start = PI;
        }else if (choice == 3) { //bottom left corner
          //changing location of arc center and starting position
          centerA = x;
          centerB = y;
          start = 0;
        }else if (choice == 4) { //bottom right corner
          //changing location of arc center and starting position
          centerA = x;
          centerB = y;
          start = PI / 2;
        }
        noFill();
        stroke(300, random(255), random(255)); //randomizes color of stroke
        //nested loop to draw multiple arcs on the same rotation
        for(var i=1;i<=9;i++){
          arc(centerA, centerB, 10*i, 10*i, start, start + (PI / 2));

        }
        // arc(centerA, centerB, 90, 90, start, start + (PI / 2));
        // arc(centerA, centerB, 80, 80, start, start + (PI / 2));
        // arc(centerA, centerB, 70, 70, start, start + (PI / 2));
        // arc(centerA, centerB, 60, 60, start, start + (PI / 2));
        // arc(centerA, centerB, 50, 50, start, start + (PI / 2));
        // arc(centerA, centerB, 40, 40, start, start + (PI / 2));
        // arc(centerA, centerB, 30, 30, start, start + (PI / 2));
        // arc(centerA, centerB, 20, 20, start, start + (PI / 2));
        // arc(centerA, centerB, 10, 10, start, start + (PI / 2));
      }
    }
    noLoop();
}

For this project, I created a generative, color-changing and angle-rotating arc-tiled wallpaper. I’ve always been drawn to circular forms and loved the effect I got when repeating and transforming the arc quadrants. First I needed to dictate the four points of origin for the arcs on each vertex of the tile, then the rotation direction and angle of the arcs. I randomize the origin points, the starting points of rotation and the colors of the arcs so that the wallpaper can generate a different pattern with each refresh.

Here are some of my abstract sketches and logic.

Iterations:

adev_Project_05_Wallpaper

sketch

// Aisha Dev
// 15-104 Section D
// adev@andrew.cmu.edu
// Project 5

var i; //y
var sW = 0.1;
var spacingOne;
var spacingTwo;
var spacingThree;

var lineX1 = 1;

var lineWdith;

var n; // x

function setup() {
   createCanvas (480,480);
  background (206,193,164);
  noFill();
  stroke(6,7,0);
  spacingOne = random (15,23);
  spacingTwo = random (10,15);
   spacingThree = random (15,23);
   
 lineWdith = 48;

}

function draw() {
var lineX2 = n+lineX1;
 for (n = 0; n < width; n = n+1){
 for (i = 0; i < height; i = i + 1){

 	
    strokeWeight (sW*i);
    line (lineX1, i*spacingOne,lineWdith ,i*spacingOne);    
    strokeWeight ((sW*2)*i);
    line (lineWdith, i*spacingTwo, lineWdith*1.5,i*spacingTwo);
    line (lineWdith*1.7, i*spacingTwo, (lineWdith*1.7)+i*2,i*spacingTwo);
    line ((lineWdith*2)+(i*2), i*spacingOne, width/2.5,i*spacingOne);
     strokeWeight ((sW*1.6)*i/2);
     line ((width/2.5) + 10, i*spacingThree,(width/2.5) + 58 ,(i*spacingThree));
      strokeWeight ((sW*2)*i);
    line ((width/2.5) + 64, i*spacingTwo,(width/2.5) + (lineWdith*3),i*spacingTwo);
    line (345, i*spacingTwo, 345 + i*2,i*spacingTwo);
    strokeWeight (sW*i);
      line (365 + i*2, i*spacingOne, 425,i*spacingOne);
       strokeWeight ((sW*1.3)*i);
        line (430, i*spacingThree, width ,i*spacingThree);  
	}
     }




   

 }



I was really inspired by Nasreen Mohamedi’s work. I think her patterns and textiles are so amazing an intricate and I have been a fan of her work for so long. She did all these delicate lines and geometries by hand and I thought it would be interesting to see how to take that into a digital space.

ssontag – Project – 05 – Wallpaper

For this project i wanted to be reminiscent about the striped blue and grey wallpaper i had in my childhood bedroom. I also decided i wanted to add some of the line work style that i have developed in architecture school.

sketch

;function setup() {
//variables to set up ordered spacing within the for loop
    var sY = 40;
    var sX = 20;

    var rX = 20;

    createCanvas(380, 380);
    background(210);
//a for loop that sets up the background bars of blue and grey iterating across the x axis
   for(var i = 0; i < 20; i++) {
        noStroke();
//modulus so there is an alternating pattern between even and odd
        if ((i % 2) == 0) {
            fill(70, 130, 180);
//an else statment that sets the fill as grey for every other
        } else {
            fill(210);
        }
        rect(i * rX, 0, rX, 400);
    }
//a for loop that wil set up the grid for th repeating pattern in the x direction 
    for(var x = 0; x < 20; x++) {
// an if statement and a for loop that makes the bezier curves and some ellipse's using modulus to
//make it occur every other row
        if ((x % 2) == 0) {
            for(var y = 0; y < 10; y++) {
                noFill();
                stroke(1);
                bezier(x * rX + sX, y * sY, x * rX, y * sY, x * rX + sX, y * sY + 20, 
                    x * rX + sX - 10, y * sY + 20);
                bezier(x * rX + sX - 10, y * sY + 20, x * rX, y * sY + 20, x * rX + sX,
                    y * sY + 40, x * rX, y * sY + 40);
                ellipse(x * rX + 10, y * sY + 20, 20, 20);
            }
        } else {
//an else statement that sest the lines and ellipses for the grey rows
            for(var y = 0; y < 10; y++) {
                line(x * rX + sX, y * sY, x * rX, y * sY);
                ellipse(x * rX + 10, y* sY, 35, 35);
            }
        }
    }
    noLoop();
//keeps the drawing from animating, it will draw itself once like a wallpaper
}

function draw() {

}

atraylor – Project 05 – Section B

sketch

// atraylor
// Section B
// Project 05


function setup() {
    createCanvas(480, 480);
    background(13, 150, 255);
}

function draw() {

    moreThings(); // yellow spots



    var move = 8; // the amount move in x per line segment
    var lastX = -1; // beginning values
    var lastY = -1;
    var y = 1;
    var borderX = 0; // translates to edge
    var borderY = -1;
    stroke(127, 199, 255);

    for(var moveY = 0; moveY < 1000; moveY += 10){ // lines in the background
        for(var x = borderX; x <= width-borderX; x+= move){
            y = moveY + borderY + random(1, 20);

            line(x, y, lastX, lastY);

            lastX = x; //place the "new" x y values into last
            lastY = y;
        }
    }
    noLoop();
    things();//orange and purple circles
    noLoop();


}

function things(x, y){ //orange and purple circles
    for(var y = 0; y < width; y+= 100){
        for(var x = 0; x < height; x+= 100){
            var n = random(1, 5);
            var m = random(-5, 5);
            stroke(255, 183, 87);
            fill(255, 146, 0);
            ellipse(40 + x + n, 40 + y + n, 40, 40);
            stroke(108, 108, 244);
            noFill();
            strokeWeight(5);
            ellipse(41 + x + m, 48 + y + m, 40 + m, 40 + m);
        }
    }
}

function moreThings(x, y){ // yellow spots
    for(var y = 0; y < height; y += 100){
        for(var x = 0; x < width; x += 100){
            var n = random(1, 5);
            noStroke();
            fill(255, 230, 154);
            ellipse(x + n, y + n, 10, 10);
        }
    }
}

 

For this project, I wanted to practice making noisy lines. I used a for loop that drew sections of the line, using previous coordinates as starting points. Then I added another loop that translates the y coordinates of the line through each iteration. An improvement that I would make would be to remove the connecting lines between the rows. The result of the loop looked like primitive waves or mountains to me. I decided to pursue this concept by using bright and sunny colors. I don’t think I would wear this pattern, but it gave me a chance to try something new.