Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The solution of this question m Start by writing an active Processing program that will simply m draw a small white circle, 50 pixels in

The solution of this question

image text in transcribed
m Start by writing an active Processing program that will simply m draw a small white circle, 50 pixels in diameter, whose centre is always at the mouse position. Use a light grey background (try 200). Use constants for these values so that they can be changed easily and reliably. Once this is working, add "ears" to your circle, so that ya: will get a simple "panda head" as shown. 0 Draw two black circles behind the white one. 0 The size of the black circles should be 60% of the size of the white circle. Make that value a constant (0.60) so that it can be changed. 0 Some simple trigonometry will be used to control the positions of the centres of the black circles, as shown in the diagram below (only one ear shown). 0 The distance d between the centres of the black and white circles should be 45% of the diameter of the white circle. Use a constant (0.45), of course. o The angle 6 should be controlled by a constant. It will be in radians. To start, use a value of QUARTER_PI which is equivalent to 45 degrees. Then try 0, and the cars should be on the sides. If you try HALF_PI (90 degrees), both cars will be on the top of the head. Make sure this works. M

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

Discrete Mathematics With Applications

Authors: Susanna S Epp, Robert Gatewood,

4th Edition

1133168663, 9781133168669

More Books

Students also viewed these Mathematics questions