Question: Polygon rotate. Write a java program that draws a polygon (say a rectangle, you choose a reasonable size) and then plays an animation of the
Polygon rotate. Write a java program that draws a polygon (say a rectangle, you choose a reasonable size) and then plays an animation of the polygon rotating through 360 degrees, one degree per frame. The animation should start when the user clicks INSIDE the polygon. Ignore clicks outside the polygon. Use the coordinates of the clicked point as the center of rotation. Make a stop button so that the animation can be stopped at any time (without having to wait for the complete 360 degree rotation to complete). Make a reset button that starts at the default location/orientation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
