xxxxxxxxxx
76
function setup() {
createCanvas(400, 550);
background(0, 0, 0) // I left the background() call here just in case
}
function draw() {
background(236, 216, 198); // I put another one in draw() to change colors
// function to make the background change colors
if (mouseIsPressed) {
background(random(255), random(255), random(255))
}
// rectangular fill for lower blue half of image
noStroke();
fill(153, 230, 255);
rect(0, 350, 400, 250);
// balls of electrical chord
stroke(0);
strokeWeight(5);
noFill();
// left chord ball shadows
stroke(56,56,56, 220);
ellipse(90, 355, 60, 45);
ellipse(100, 360, 70, 45);
ellipse(95, 365, 83, 45);
// right chord ball shadows
ellipse(162, 370, 60, 60);
ellipse(164, 375, 70, 70);
ellipse(160, 378, 83, 70);
stroke(0); // change stroke back to black for other parts of drawing
// left chord ball
ellipse(90, 315, 60, 60);
ellipse(100, 310, 70, 60);
ellipse(95, 310, 83, 70);
// right chord ball
circle(156, 315, 60,);
circle(165, 315, 60,);
circle(165, 310, 60,);
// multiple wires across the image.
line(0, 285,400,285)
line(0, 295,400,285)
line(0, 280,400,275)
// triangular shadow.
/* did a lot of exploratory programming for these points... there are too many arguments ahh */
stroke(56,56,56, 220); // since this is a shadow, I changed the stroke color to grey
triangle(170, 350, 270, 350, 220, 460)
// leaves
stroke(60,179,113); // green leaf color
fill(60,179,113);
triangle(20, 549, 71, 460, 60, 549)
triangle(60, 549, 123, 486, 104, 552)
}