function setup() {
createCanvas(400,300);
}
function draw() {
background(221,251,171);
//curve 1
startX = 400;
stopX = 200;
startY = 150;
stopY = 0;
for(var n = 0; n <20; n++){
stroke(0);//black
strokeWeight(1);
line(startX, startY + 20,stopX - 20, stopY);
startY += 20;
stopX += 7;
}
//curve 2
startX = 400;
stopX = 0;
startY = 250;
stopY = 0;
for(var n = 0; n < 20; n++){
stroke(0,0,255);//blue
strokeWeight(1);
line(startX, startY - 20, stopX + 10, stopY);
startX += 2;
stopY += 20;
}
//curve 3
startX = 0;
stopX = 400;
startY = 150;
stopY = 0;
for(var n = 0; n < 40; n++){
stroke(200,118,165);//pink
strokeWeight(2);
line(startX, startY, stopX, stopY);
startX += 10;
stopY += 10;
}
//curve 4
startX = 400;
stopX = 200;
startY = 150;
stopY = 0;
for(var n = 0; n <20; n++){
stroke(255,0,0);//red
line(startY + 20, startX,stopY, stopX - 20);
startY += 20;
stopX += 7;
}
}
I used for loops with various add ons to create four different “curves”. I played around with adding mouse interaction but I didn’t think it looked cohesive when one or two of the curve’s moved along with the mouse. I chose a color palette that matched the modern feel of the assignment.