Question
Your first variables The system variables mouseX and mouseY have values that reflect the position of the mouse on the canvas. 1. Update your program
Your first variables
The system variables mouseX and mouseY have values that reflect the position of the mouse on the canvas.
1. Update your program by setting the position of the ellipse to be specified by mouseX and mouseY.
2. Run the program and check that the ellipse follows your mouse around the canvas.
3. Move the background command into the setup method and run your program again. What difference do you see and can you explain why you see different behaviour?
4. Move the background command back into the draw method, but put it back as the last command in the draw method.
5. Run your program again. What difference do you see and can you explain why you see different behaviour?
6. Move the background command back to be the first command in the draw method.
7. Save your sketch.
Your first variables
The system variables mouseX and mouseY have values that reflect the position of the mouse on the canvas.
1. Update your program by setting the position of the ellipse to be specified by mouseX and mouseY.
2. Run the program and check that the ellipse follows your mouse around the canvas.
3. Move the background command into the setup method and run your program again. What difference do you see and can you explain why you see different behaviour?
4. Move the background command back into the draw method, but put it back as the last command in the draw method.
5. Run your program again. What difference do you see and can you explain why you see different behaviour?
6. Move the background command back to be the first command in the draw method.
7. Save your sketch.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started