Page 1 of 1

Q1: Rotate Drone Propellers: Trigonometry [10] Purpose: Using the program to draw a drone in Assignment 1 Question 2, up

Posted: Thu Jul 14, 2022 2:19 pm
by answerhappygod
Q1: Rotate Drone Propellers: Trigonometry [10] Purpose: Usingthe program to draw a drone in Assignment 1 Question 2, update thecode to enable rotation of the drone’s propellers at a constantspeed. Watch the video file A3Q1.mp4 for reference. Details: Tocomplete Q1 your sketch should meet the following criteria:  Use acanvas size of 500 by 700. [1]  Declare two new variables: deltaand theta. [2] o theta will be the initial angle of the propeller.o delta is the angle by which theta would change each frame to givepropellers a rotating effect.  All the propellers should rotatewith a constant speed.  Suggestion: The following functionsdeclared in A1Q2 need to be modied in order to rotate each of thepropellers individually. The trigonometric functions for rotationcan be added when the propellers are being drawn.[5] odrawTopLeftProp(); o drawTopRightProp(); o drawBottomLeftProp(); odrawBottomRightProp();  Use the primitive data types int and/orfloat [2]  Other requirements: o For this question, at all times,your drone should be at the center of the canvas, although it maynot necessarily fill the canvas. o The drone is not required tomove with the mouse. We will add controls for that in the laterquestions. o No final named constants would be required as theposition and scale of the drone will change later. o The setup anddraw functions are required in this question.