""" SimarnaPaintal Week 3 homework Reviewed in class on Weds, Sept 17, 2025 """ r = random(0,255) g = random(0,255) b = random(0,255) def setup(): size(600,600) background(255) frameRate(24) def draw(): fill(r,g,b,150) rect(mouseX,50,200,200) fill(g,b,r,100) ellipse(300,mouseY,50,50) fill(b,r,g,70) triangle( mouseX,200, 300,300, 300,250 ) # Adding a sin() wave: t = map( mouseX, 0,width, 0,2*PI ) s = sin(t) fill(155,155,255) ellipse(t*75,s*200+300, 50,50) # Using a sin() wave with cos() to make a circle: line( 300,300, 300+sin(t)*100,300+cos(t)*200 ) def keyPressed(): saveFrame("week3-01.png")