Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!