Answered step by step
Verified Expert Solution
Question
1 Approved Answer
okay so basically this is the question remember not to use set up or draw functions. Q 1 : Draw a Helicopter [ 1 2
okay so basically this is the question
remember not to use set up or draw functions.
Q: Draw a Helicopter Marks
Draw a helicopter using the shapes that have been taught to you in the class. Figure
demonstrates the sample object. To complete Q your sketch should meet the following
criteria:
Draw a helicopter similar to but not the same as the one shown here.
Use a canvas size of by
Your helicopter must have at least:
o One rectangle, ellipse, line and triangle.
o Make use of at least two additional colors other than black and white.
o Note: Sample drawing and video has not been given any color. Use your
creativity!
The helicopter should have the features as explained in Figure
o Cockpit and Cockpit Windows
o Fuselage
o Blades
o Main Rotor and Engine Cover
o Sync Elevator, Elevator Tail and Elevator Deval
o Tail Boom and Tail fin.
Use final named constants to set the size and position of the shapes that make up the
helicopter.
At all times, your helicopter should be at the center of the canvas, and it should fill the
entire canvas.
Note: This is a static Processing program no setup or draw functions i made the helicopter but i think that the code isnt right.
here is my code
background;
float centerX width ;
float centerY height ;
Helicopter dimensions and colors
final float ELEVATORTAILWIDTH ;
final float ELEVATORTAILHEIGHT ;
final float ELEVATORDECAL ;
final float TAILBOOMX ;
final int FUSELAGEX ;
final int FUSELAGEDIAMETER ;
final int COCKPITWIDTH ;
final int ENGINECOVER ;
final int WINDOWHEIGHT ;
final int MAINROTOR ;
final int BLADEX ;
final int BLADEY ;
final int BLADEX ;
final int BLADEY ;
final int TAILFIN ;
DRAW ELEVATOR TAIL ABOVE
fill; Light gray color
rectcenterX centerY ELEVATORTAILWIDTH, ELEVATORTAILHEIGHT;
DRAW SYN ELEVATOR
fill; Darker gray color
rectcenterX ELEVATORTAILHEIGHT centerY ELEVATORTAILHEIGHT ELEVATORTAILWIDTH ELEVATORTAILHEIGHT ;
DRAW ELEVATOR TAIL BELOW
fill; Light gray color
rectcenterX centerY ELEVATORTAILWIDTH, ELEVATORTAILHEIGHT;
DRAW ELEVATOR DECAL
fill; Red color
circlecenterX ELEVATORDECAL, centerY ELEVATORTAILHEIGHT ;
DRAW ELEVATOR DECAL
circlecenterX ELEVATORDECAL, centerY ELEVATORTAILHEIGHT ;
DRAW TAIL BOOM
fill; Dark gray color
trianglecenterX TAILBOOMX, centerY ELEVATORTAILHEIGHT, centerX, centerY, centerX, centerY ;
DRAW FUSELAGE
fill; Blue color
circlecenterX FUSELAGEX centerY, FUSELAGEDIAMETER;
DRAW COCKPIT
fill; Dark blue color
rectcenterX centerY COCKPITWIDTH, FUSELAGEX FUSELAGEDIAMETER;
DRAW COCKPIT WINDOW ABOVE
fill; Cyan color
rectcenterX ENGINECOVER, centerY COCKPITWIDTH, FUSELAGEDIAMETER, WINDOWHEIGHT;
DRAW COCKPIT WINDOW BELOW
rectcenterX ENGINECOVER, centerY FUSELAGEDIAMETER, WINDOWHEIGHT;
DRAW ENGINE COVER
fill; Dark gray color
rectcenterX ENGINECOVER, centerY FUSELAGEDIAMETER, COCKPITWIDTH;
DRAW MAIN ROTOR
fill#FFF; Black color
circlecenterX MAINROTOR, centerY, ENGINECOVER;
DRAW MAIN ROTOR BLADES
fill#FF; Dark gray color
trianglecenterX MAINROTOR, centerY, centerX MAINROTOR centerY centerX MAINROTOR centerY ;
trianglecenterX MAINROTOR, centerY, centerX MAINROTOR centerY centerX MAINROTOR centerY ;
DRAW TAIL FIN
fill; Dark gray color
ellipsecenterX TAILFIN, centerY ELEVATORTAILHEIGHT, ENGINECOVER, ELEVATORTAILHEIGHT;
now i want my all parts to be relative to the center and i want to make the main rotor as my center, becuz the next question says
Q: Scalable and movable. Marks
Modify your program Q to meet the following criteria:
Use a canvas size of by
The cursor has to be in the center of your main rotor all the times, even when the
helicopter is moving.
Change constant SCALE to a variable scale for this question. Consider scale in all your
calculations so by changing this variable, the helicopter becomes smaller or bigger.
Requirement is that changing the value of scale changes the scale of the drawing
appropriately.
Use of following functions to help organize your code.
o cockPit;
o elevator;
o tailBoom;
o bladeAndRotor;
o Note: Create your own functions as and when needed. Please explain the
purpose of the functions using comments.
Note: This is an active processing program with setup and draw so please write a correct code for the helicoptor. i am attaching the photo of helicoptirr
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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 Started