xxxxxxxxxx
33
// RECODE
// Sol LeWitt Wall Drawing #295
let svg = true;
// don't forget to add the line below to the index.html
// <script src="https://unpkg.com/p5.js-svg@1.3.1"></script>
function setup() {
if (svg) {
createCanvas(700, 400, SVG);
} else {
createCanvas(700, 400);
}
background(0);
stroke(225);
noFill();
ellipse(width / 2, height / 2, 300, 300);
rectMode(RADIUS);
rect(width / 2, height / 2, 150, 150);
triangle(200, 350, 350, 50, 500, 350);
triangle(200, 350, 290, 50, 290, 350);
triangle(410, 350, 500, 50, 500, 350);
triangle(410, 350, 410, 50, 500, 350);
}
function keyTyped() {
if (key === "s") {
save();
}
}