function setup() {
createCanvas(400, 300);
}
function draw() {
background(50);
//white triangle lines downwards
for (var i = 0; i < 41; i++) {
x1 = 200;
y1 = 300;
x2 = 0;
y2 = 0;
x2 += i*10;
y2 -= i*0;
stroke(100);
strokeWeight(1);
line(x1,y1,x2,y2);
}
//white triangle lines upwards
for (var i = 0; i < 41; i++) {
x1 = 200;
y1 = 0;
x2 = 0;
y2 = 300;
x2 += i*10;
y2 -= i*0;
stroke(100);
strokeWeight(1);
line(x1,y1,x2,y2);
}
//top left curved lines
for (var i = 0; i < 40; i++) {
x1 = 400;
y1 = 0;
x2 = 0;
y2 = -50;
x1 -= i*10;
x2 -= i*10;
x2 += i*10;
y2 += i*10;
stroke(150);
strokeWeight(1);
line(x1,y1,x2,y2);
}
//bottom right curved lines
for (var i = 0; i < 45; i++) {
x1 = 400;
y1 = 300;
x2 = 400;
y2 = -50;
x1 -= i*10;
x2 -= i*10;
x2 += i*10;
y2 += i*10;
stroke(150);
strokeWeight(1);
line(x1,y1,x2,y2);
}
}
For this project I wanted to create string art with a symmetrical organization. To do this I used two intersecting triangular forms for the background with two opposite curving line groups on either corner.