Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve this programme of Java using processing specifically. Step 1: Rotate Helicopter Blades: Trigonometry (10 Marks] Purpose: Using the program to draw a Helicopter

please solve this programme of Java using processing specifically. image text in transcribed
image text in transcribed
Step 1: Rotate Helicopter Blades: Trigonometry (10 Marks] Purpose: Using the program to draw a Helicopter in Assignment 1 Question 2, update the code to enable rotation of the Helicopter's Blades at a constant speed Details: To complete your sketch should meet the following criteria: Use a canvas sire of Soo by 500 (1) Based on the Trigonometry discussed in class, declare variables delta and theta. [2] theta will be the initial angle of the propeller delta is the angle by which theta would change each frame to give Blades a rotating effect Note: Depending on how the blade has been drawn, you may need to declare more than one delta/theta. Initially, the blades should rotate with a constant speed Use the primitive data types int and/or float 2]. Other requirements: For this question at all times, your Helicopter should be at the center of the canvas, although it may not necessarily fill the canvas The setup and draw functions are required in this question Step 2: Add a speed controller to change the Helicopter speed with mouse clicks. [10 Marks] Purpose: Create a speed controller that will allow user to change the speed Figere i Helicopter was Controller of the Helicopter blades interactively Draw a speed controller as shown in Figure 1. It should consist of two buttons: a button with Up displayed on it and a button with a DN displayed on it. The UP button will increase the speed of the Helicopter and ON button will decrease the speed You should create a function for this functionality. This function will then call the two functions that will be added in step 3 This function is only used to change the speed of the blades. Step 3: Enable scaling with the speed buttons: Common Scaling Problem [10 Marks] Purpose: Update your program to give a flying effect to the Helicopter, so that it appears to be rising up out of the canvas toward the user. When the program starts, the blades should be moving with constant speed and should be drawn at the smallest scale. When the UP button is pressed, the blades should start to rotate and the size of the Helicopter should increase. The rotation speed and the Helicopter's size should continue to increase every time the top button is pressed. When the DN button is pressed the speed and size should decrease Details: Declare four final named constants: This is to assign maximum and minimum values to the Helicopter's scale and delta (rotation speed) individually. E, DELTA_MAX, DELTA_MIN, SCALE_MAX and SCALE_MIN (4) DELTA_MAX should be adjusted to give the best maximum speed in terms of appearance. Higher speeds may not appear visibly pleasing DELTA_MIN is the value at which your Blades are at the minimum speed SCALE_MAX is the value that will make your Helicopter till the 500x500 area. Note: Helicopter may not be visible completely, but make your best judgement. SCALE_MIN is the smallest scale possible that will give a good appearance Dectare methods as needed to achieve the following: 16] ASSIGNMENT 2 COURSE NUMBER COMP 2010 These methods should be called to update the wave of dela so that speed of the blades increases or decreases when Und numered on the controller Other purpose will be to take the value of the range DELTA MAX DELTAMIN and provide the corresponding scale wishenge SCALE MAXI SCALE MIN Use the formula lained in the common slide to achieve the result Again, this will ensure that the speed of the proper scales according to the side of the Helicopter. When the speed is the Helicopter should be said to the canvas. When the blades stop mowing the Helicopter's should be the smallest Use the primitive datatypes in and/or flot where necessary All the man and min values are final contents Note: This is an active processing program with setup and draw Use A201.mpt for reference. Please note the video is becer. The rotation of lades tihed appear as the blades are not rotating all Total marks: 30 End of Assignment 2 Step 1: Rotate Helicopter Blades: Trigonometry (10 Marks] Purpose: Using the program to draw a Helicopter in Assignment 1 Question 2, update the code to enable rotation of the Helicopter's Blades at a constant speed Details: To complete your sketch should meet the following criteria: Use a canvas sire of Soo by 500 (1) Based on the Trigonometry discussed in class, declare variables delta and theta. [2] theta will be the initial angle of the propeller delta is the angle by which theta would change each frame to give Blades a rotating effect Note: Depending on how the blade has been drawn, you may need to declare more than one delta/theta. Initially, the blades should rotate with a constant speed Use the primitive data types int and/or float 2]. Other requirements: For this question at all times, your Helicopter should be at the center of the canvas, although it may not necessarily fill the canvas The setup and draw functions are required in this question Step 2: Add a speed controller to change the Helicopter speed with mouse clicks. [10 Marks] Purpose: Create a speed controller that will allow user to change the speed Figere i Helicopter was Controller of the Helicopter blades interactively Draw a speed controller as shown in Figure 1. It should consist of two buttons: a button with Up displayed on it and a button with a DN displayed on it. The UP button will increase the speed of the Helicopter and ON button will decrease the speed You should create a function for this functionality. This function will then call the two functions that will be added in step 3 This function is only used to change the speed of the blades. Step 3: Enable scaling with the speed buttons: Common Scaling Problem [10 Marks] Purpose: Update your program to give a flying effect to the Helicopter, so that it appears to be rising up out of the canvas toward the user. When the program starts, the blades should be moving with constant speed and should be drawn at the smallest scale. When the UP button is pressed, the blades should start to rotate and the size of the Helicopter should increase. The rotation speed and the Helicopter's size should continue to increase every time the top button is pressed. When the DN button is pressed the speed and size should decrease Details: Declare four final named constants: This is to assign maximum and minimum values to the Helicopter's scale and delta (rotation speed) individually. E, DELTA_MAX, DELTA_MIN, SCALE_MAX and SCALE_MIN (4) DELTA_MAX should be adjusted to give the best maximum speed in terms of appearance. Higher speeds may not appear visibly pleasing DELTA_MIN is the value at which your Blades are at the minimum speed SCALE_MAX is the value that will make your Helicopter till the 500x500 area. Note: Helicopter may not be visible completely, but make your best judgement. SCALE_MIN is the smallest scale possible that will give a good appearance Dectare methods as needed to achieve the following: 16] ASSIGNMENT 2 COURSE NUMBER COMP 2010 These methods should be called to update the wave of dela so that speed of the blades increases or decreases when Und numered on the controller Other purpose will be to take the value of the range DELTA MAX DELTAMIN and provide the corresponding scale wishenge SCALE MAXI SCALE MIN Use the formula lained in the common slide to achieve the result Again, this will ensure that the speed of the proper scales according to the side of the Helicopter. When the speed is the Helicopter should be said to the canvas. When the blades stop mowing the Helicopter's should be the smallest Use the primitive datatypes in and/or flot where necessary All the man and min values are final contents Note: This is an active processing program with setup and draw Use A201.mpt for reference. Please note the video is becer. The rotation of lades tihed appear as the blades are not rotating all Total marks: 30 End of Assignment 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

manageremployee relationship deteriorating over time;

Answered: 1 week ago