xxxxxxxxxx
33
// FS in DA: Simple shapes
//
// Ewan Klein
// ewan@prewired.org
//
// Reference: https://p5js.org/reference/
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// Set stroke colour to pink
stroke(255, 0, 255)
strokeWeight(5)
line(100, 5, 100, 650)
noStroke();
// Set the fill color to red
fill(255, 100, 0);
rect(152, 10, 60, 100);
// Set the fill color to green
fill(0, 255, 0);
ellipse(200, 240, 80, 80);
// Set the fill color to blue
fill(0, 0, 255);
triangle(250, 250, 390, 250, 310, 80)
}