Question
Create a timeline animation that shows a line with one end at the center of a 300*300 stage and the other end that follows around
Create a timeline animation that shows a line with one end at the center of a 300*300 stage and the other end that follows around a circle whose radius is half the size of the square stage like the second hand of a clock. Create an array of 100 such lines using a for loop ,and then use this array as the frames for a KeyFrame object.hint : the center of the stage is NOT(0,0) but if it was ,the location of the end of the line would (300*cos(a),300*sin(a)) where a is an angle in radians .For each of the 100 locations (step 0 through 99) this angle will be step*2*pi/100.Of course the center of the stage is really (150,150) so you will have to account for that.set the frame duration so that the line does a complete rotation once per second.
Step by Step Solution
3.37 Rating (153 Votes )
There are 3 Steps involved in it
Step: 1
import javaawtColor import javaawtGraphics import javaawtGraphics2D import javaawteventActionEvent i...Get Instant Access to Expert-Tailored 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 StartedRecommended Textbook for
Vector Mechanics for Engineers Statics and Dynamics
Authors: Ferdinand Beer, E. Russell Johnston, Jr., Elliot Eisenberg, William Clausen, David Mazurek, Phillip Cornwell
8th Edition
73212229, 978-0073212227
Students also viewed these Computer Network questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App