Your instructor may assign one or more of the following problems. Don’t feel that you must do all the problems; for the homeworks, you are only required to do those that are explicitly assigned via Moodle.
Create and animation that repeatedly draws figures on the canvas. The figures should be of random sizes, colors and locations, but bound in size and location so that they (mostly) stay on the canvas. Use the help functions from the lab to compute these random values. See the sample output on the right,which uses all circles. Use a figure (or figures) of your choice, anything except the circles shown in the example.
Add a control panel to the bottom that includes a button that clears
the canvas, and bind any mouse click (i.e., <Button-1>
) on the canvas to the clear-canvas handler as well. Note that you
can clear all objects from a canvas using my_canvas.delete(ALL).
The animation should start automatically, when the application is run.
Include an exit button and configure the window-delete event so that the animation terminates with no errors when the user clicks on the window’s “X” button.
Submit all appropriate files for grading, including code files, screen captures, supplemental files (e.g., image files), and text files. We will grade this exercise according to the following criteria: