Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Draw a spacehship using the shapes that have been taught to you in the class. Figure 1 demonstrates the sample object. To complete Q1

image

Draw a spacehship using the shapes that have been taught to you in the class. Figure 1 demonstrates the sample object. To complete Q1 your sketch should meet the following criteria: Use a canvas size of 500 by 500. [1] A101 Your spaceship must have at least: [2] Some rectangles, ellipses, lines, triangles and or arc. Make use of at least two additional colors other than black and white. The spaceship should have the following features Spaceship capsule [1] Spaceship body [1] O Spaceship base [1] 0 Landing pads and connecting poles. [2] Use final named constants to set the size and position of the shapes that make up the ship. [1] Use the primitive data types int and float [3] Your ship should be at the center of the canvas, approximately. This depends on what you chose as reference point of your drawing. In the example, center of the spaceship body is the center of reference. [1] Draw a spaceship similar to, but not the same as, the one shown here.[2] Note: This is a static Processing program (no setup or draw functions). Activate Windows Go to Settings to actuat Q1b: Draw Stars [10] Modify your program in Q1a to add stars to the drawing. This will create an impression of the spaceship in the outer space. Make use of two triangles to draw the star. Draw at least 10 such stars on your drawing. Allow different locations to each star so they are drawn evenly on the drawing. Notice repeat of code to draw stars. You will be taught how to reduce this repetition in coming lectures. Note: Q1 is now complete. Submit it on moodle. Q2: Movable: Spaceship. [15] Modify your program Q1b to meet the following criteria: This is an active processing program (with setup and draw). [4] The cursor has to be in the center of your ship approximately all the times. As explained in Q1, center in the example is the center of the ship body. [4] A1Q1 In the draw method, use both mouseX and mouseY so that, by moving your mouse, the ship moves in both the x-axis and y-axis freely.[4] Use a canvas size of 500 by 500. [1] Use of following functions to help organize your code. [2] O drawStars(); o drawBody();

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

Database Systems Design Implementation and Management

Authors: Carlos Coronel, Steven Morris

13th edition

1337627909, 978-1337627900

More Books

Students also viewed these Programming questions