/*Vicky Zhou
Section E
vzhou@andrew.cmu.edu
Project-05-Wallpaper*/
var x1 = 50;
var y1 = 50;
function setup() {
createCanvas(480, 480);
background(250, 240, 220);
noLoop();
}
//creating own function to draw one houndstooth
function houndstooth(x1, y1) {
print(x1,y1);
//draw one houndstooth
var sqsize = 50;
// for (var i = 0; i <= 100; i += 10);
fill(177, 92, 62); //brown
noStroke();
rect(x1, y1, sqsize, sqsize); //rectangle center
triangle(x1, y1, //first triangle pointy part
x1 - (sqsize/2), y1,
x1, y1 + (sqsize/2));
triangle(x1, y1, //second triangle pointy part
x1 + (sqsize/2), y1,
x1, y1 - (sqsize/2));
triangle(x1, y1 + (sqsize), //left top
x1 + (sqsize/2), y1 + (3 * sqsize/2),
x1 + (sqsize/2), y1 + (sqsize));
triangle(x1 + (sqsize/2), y1 + (3 * sqsize/2), //left bottom
x1 + (sqsize), y1 + (3 * sqsize/2),
x1 + (sqsize), y1 + (2 * sqsize));
triangle(x1 + (sqsize), y1, //right top
x1 + (sqsize), y1 + (sqsize/2),
x1 + (3 * sqsize /2), y1 + (sqsize/2));
triangle(x1 + (3 * sqsize/2), y1 + (sqsize/2), //right bottom
x1 + (3 * sqsize/2), y1 + (sqsize),
x1 + (2 * sqsize), y1 + (sqsize));
triangle(x1 + (sqsize/2), y1 + (sqsize), //left connecting triangle
x1 + (sqsize/2), y1 + (3 * sqsize/2),
x1 + (sqsize), y1 + (3 * sqsize/2));
triangle(x1 + (sqsize), y1 + (sqsize/2), //right connecting triangle
x1 + (3 * sqsize /2), y1 + (sqsize/2),
x1 + (3 * sqsize/2), y1 + (sqsize));
}
function draw() {
for (var y = 0; y <= height; y+= 100){
for (var x = 0; x <= width; x += 100){
houndstooth(x + 30, y + 30); //draws houndstooth
//first stitch mark
fill(40, 32, 24, 150); //black
ellipse(x, y + 50, 3, 60);
ellipse(x, y + 50, 60, 3);
//second stitch mark
fill(250, 240, 220, 100); //cream
ellipse(x + 50, y + 50, 3, 60);
ellipse(x + 50, y + 50, 60, 3);
}
}
}
In this project prompt, the idea of a “wear-able” pattern immediately made me think of houndstooth, plaid, and Patagonia’s fleeces. In the end, I decided to draw my main inspiration from an urban outfitter’s houndstooth dress. I constructed it using squares and triangles, and also wanted to add an element of a “stitch” to create the texture of fabric. The concept that I struggled the most with during this pattern was constructing my own function (houndstooth), because it was difficult to reposition it in the draw function.