Modify Exercise to create five random points on a circle, form a polygon by connecting the points clockwise, and display the circle and the polygon, as shown in Figure
Write a program that generates three random points on a circle centered at (0, 0) with radius 40 and display three angles in a triangle formed by these three points, as shown in Figure 4.7a. (Hint: Generate a random angle a in radians between 0 and 2p, as shown in Figure 4.7b and the point determined by this angle is (r*cos(a), r*sin(a)).)

(a) A triangle is formed from three random points on the circle. (b) A random point on the circle can be generated using a random angle a. (c) A pentagon is centered at (0, 0) with one point at the 0 o’clock position.

(b) Exercise connects five random points on a circle.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.