sketch
var x1Step = 5;
var y1Step = 5;
function setup() {
createCanvas(400, 300);
}
function draw() {
background (255);
fill(0);
rect(50, 0, 300, 300);
stroke(255, 251, 217);
for(var j = 1; j <= 30; j++){
line(50, 0 + y1Step * j, width / 2 - x1Step * j, 0);
} for(var j = 1; j <= 30; j++){
line(50, height - y1Step * j, width / 2 - x1Step * j, height);
} for(var j = 1; j <= 30; j++){
line(width - 50, height / 2 - y1Step * j, width - 50 - x1Step * j, 0);
} for(var j = 1; j <= 30; j++){
line(width - 50, height / 2 + y1Step * j, width - 50 - x1Step * j, height);
}
stroke("white");
for(var i = 1; i <= 30; i++){
line(width / 2, 0 + y1Step * i, width / 2 + x1Step * i, height / 2);
} for(var x = 1; x <= 30; x++){
line(width / 2, height - y1Step * x, width / 2 + x1Step * x, height / 2);
} for(var x = 1; x <= 30; x++){
line(50 + x1Step * x, 0, width / 2, 0 + y1Step * x);
} for(var x = 1; x <= 30; x++){
line(50 + x1Step * x, height, width / 2, height - y1Step * x);
}
stroke (194, 237, 231)
for(var j = 1; j <= 30; j++){
line(width / 2, 0 + y1Step * j, width / 2 - x1Step * j, height / 2);
} for(var j = 1; j <= 30; j++){
line(width / 2, height / 2 + y1Step * j, width / 2 + x1Step * j, height);
} for(var j = 1; j <= 30; j++){
line(50 + x1Step * j, height / 2, width / 2, height / 2 + y1Step * j);
} for(var j = 1; j <= 30; j++){
line(width / 2 + x1Step * j, 0, width / 2, height / 2 - y1Step * j);
}
stroke(252, 204, 212);
for(var j = 1; j <= 30; j++){
line(50, height / 2 - y1Step * j, width / 2 - x1Step * j, height / 2);
} for(var j = 1; j <= 30; j++){
line(50, height - y1Step * j, 50 + x1Step * j, height / 2);
} for(var j = 1; j <= 30; j++){
line(width - 50, height / 2 - y1Step * j, width / 2 + x1Step * j, height / 2);
} for(var j = 1; j <= 30; j++){
line(width - 50, height - y1Step * j, width - 50 - x1Step * j, height / 2);
}
}
I really enjoyed this project. I have made string art before by hand using the actual string and nails and wood, so it was interesting making it through the computer this time.