function setup() {
createCanvas(400, 300);
strokeWeight(1);
}
function draw() {
background(150, 53, 54);
//black string
for ( x = 0; x < 400; x += 20){
stroke(84,1,3);
line(x, 0, x * 1.5, 120);
line(1.5 * x, 120, 1.2 * x, 300);
}
//light pink string
for (y = 20; y < 300; y+= 50){
noFill();
stroke(254, 170, 171);
bezier(0, y * 1.5 , 50, y, 20, y * .4, 400, y);
}
//strawberry string
for (a = 0; a < 200; a += 10){
noFill();
stroke(210, 107, 108);
bezier(0, a * 0.5, 30, a * 1.3, 300, a, 400, a *2);
bezier(1.5 * a, 120, 1.2 * a, 300, 0, a, 40, 20);
stroke(140, 123, 172);
bezier(50 * a, 120, 1.2 * a, 300, 0, a, 40, 20);
bezier(100 * a, 120, 1.2 * a, 300, 0, a, 40, 20);
}
//purple string
for (b = 350; b < 400; b+= 20){
bezier(300, 60, b, 40, 20, 10 * b, 120, 1.2 * b);
bezier(30, 20, b, 40, 20, 10 * b, 120, 1.2 * b);
bezier(60, 20, b, 40, 20, 10 * b, 120, 1.2 * b);
bezier(100, 20, b, 40, 20, 10 * b, 120, 1.2 * b);
bezier(170, 22, b, 40, 20, 10 * b, 120, 1.2 * b);
bezier(250, 40, b, 40, 20, 10 * b, 120, 1.2 * b);
}
}
With this project I had fun playing with bezier curves and seeing what resulted from different loops in the code. I didn’t exactly have a distinct form in mind, and I didn’t want to make one because I felt it would take away from my exploration of the piece.