//A2-04 Write a function with one parameter and demonstrate it visually. //global variable //int myPositionX = mouseX; //setup method void setup(){ size (350,350); background (128,200,255); fill (49,138,14); rect (0,height*2/5, width, height); } //draw method void draw() { fill (255,0,0); smooth (); int myPositionX = mouseX; if (mousePressed){ drawMyFlor(myPositionX); } } void drawMyFlor(int x) { pushMatrix(); translate (x, height*2/5); ellipse(0,-15,25,25); ellipse(15,0,25,25); ellipse(0,15,25,25); ellipse(-15,0,25,25); fill(255,255,0); ellipse(0,0,5,5); popMatrix(); }