/* Nina Yoo
Section E
nyoo@andrew.cmu.edu
Project-04*/
var change = 5 // changing the lines position from one another (increments)
function setup() {
createCanvas(400, 300);
background(0);
}
function draw() {
for(var r=100; r < height; r+= change){ // starting at x position 100 and spreading height --> change is space between lines
stroke(150,11,200);
strokeWeight(.5);
line(r, 0, width, r*.5);
} // line goes along width, divides change by half
//right side pattern reaching to bottom of canvas at 300 starting at y coordinate 100 from right side
for(var l=100; l < width; l+= change){
stroke(90,112,6);
strokeWeight(.5);
line(l, 300, width, l *.3);
}
//overlaying previous to make curved design change
for(var g=50; g < height; g+= change){
stroke(75,154,22);
strokeWeight(1);
line(g, height,500, g);
}
//left side bottom --> turning at same point the top patter starts
for(var h= 100; h<height; h+= change){ //100 is the starting value of change
stroke(111,23,200);
strokeWeight(.5);
line(h, height, 0 ,h);
}
//overlaying left side bottom shape
for(var j= 0; j<height; j += change){ //starts at 0 --> limit is height
stroke(68,112,115);
strokeWeight(.5);
line(j, width, 0, j);
}
for(var m = 0; m < width; m+= change){
stroke(100,78,150)
strokeWeight(.5);
line(m, 0, height,m)
}
}
This project was fun to experiment with the different line patterns and textures you can create. For example, by overlapping sets of line you can create interesting shapes that look like after images and play with your eyes, which is what I experimented with on the green part of the project. It was also fun to see how shadows worked on the lines depending on the spacing set.