Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make race track. Set the background colour to green for grass. Draw a thick stroke (e.g. 40 pixels) gray ellipse to represent the road which

Make race track. Set the background colour to green for grass. Draw a thick stroke (e.g. 40 pixels) gray ellipse to represent the road which is 100 pixels high and 200 pixels wide, centred in the canvas. Inside the gray road draw two thin (e.g. 1 pixel thick) yellow lines which are very close to each to represent centre lines on a road. Create two small circles (e.g. 10 pixels diameter) and place them on each side of the road. You should position the circles using the angular arithmetic used in the last slide of 3.4 Math functions. Animate the angle of the two circles at different speeds, e.g. one circle's angle increments by 1 while the other increments by 2 for each call of the draw() function.

please send me the code for this question.

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_2

Step: 3

blur-text-image_3

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

Introduction To Statistical Investigations

Authors: Beth L.Chance, George W.Cobb, Allan J.Rossman Nathan Tintle, Todd Swanson Soma Roy

1st Edition

1118172140, 978-1118172148

More Books

Students also viewed these Programming questions