introduction to computation
1.10-2.9.2022
wintersession 2022

let xpos = 350;
let speed = 1;
let ypos= 350;
let a = 390;
let b = 20;
let c=1;

function setup() {
createCanvas(790,550);
}

function draw() {
background(242, 232, 223);
noStroke();
fill(210, 140, 132)
ellipse (100,100,200,200);
fill (236, 197, 78);
ellipse(200,200,100,100);
fill (216, 58, 47);
ellipse (175,175,75,75);
fill(43, 30, 40);
ellipse (100,100,150,150);
fill (110, 51, 107);
ellipse (100,100,75,75);
fill(255,0,0,);
rect(random (590,790),random(100,300),40);
fill(0,255,0,);
rect(random (590,790),random(100,300),40);
fill(0,0,255,);
rect(random (590,790),random(100,300),40);
fill(0,0,255,);
rect(random (590,790),random(100,300),40);
stroke(0);
line(125,300,300,125);
line(300,125,475,300);

if (mouseX>300){
stroke(0);
line(300,50,300,175);
}

else {
stroke(0);
line(275,100,350,100);
line(275,110,350,110);
}

if ((mouseY(less than)450)(and)(mouseY(greater than)=350)){
stroke(0);
fill(255,255,0);
ellipse(100,400,100,100);
}

noFill(300);
stroke(random(255),random(255),random(255));
ellipse (xpos,ypos,50);
xpos = xpos+speed;

if (xpos>500){
speed=-speed;
}

if (xpos(less than)350){
speed=speed*-1;
}

xpos+=speed;

noStroke();
fill(242, 232, 223);
rect(200,350,500);
stroke(0);
line (200,350,600,350);
line (400,350,400,550);

for (let lineX = 590; lineX (less than or equal to) 790; lineX += 40){
line(lineX, 0, lineX, height);
}

for (let lineY = 100; lineY (less than or equal t0) 300; lineY += 40) {
line(590, lineY, width, lineY);
}

}