Hello everybody.
I'm trying to solve the following programming exercise:
(Drag points)
Draw a circle with three random points on the circle.
Connect the points to form a triangle.
Display the angles in the triangle.
Use the mouse to drag a point along the perimeter of the circle.
As you drag it, the triangle and angles are
redisplayed dynamically, as shown in Figure.
For computing angles in a triangle, see Listing 4.1.
In order to solve this exercise, I need to solve several "sub-exercise" challenges.
I've already solved the majority of the issues stopping me to solve this problem.
I already know how to draw a circle with three random points on the perimeter of that same circle.
I already know how to connect three points to form a Triangle.
I've created a Triangle class that allows for the creation of two types of Triangles.
One Triangle only receives the length of the three sides.
The second Triangle receives three Points(x, y) and it calculates the sides.
I already know how to Display the angles in the triangle.
The Triangle class has a method to get the angles of the three vertices of the Triangle.
I already know how to Drag a Point Vertice (represented as a Circle) of a Triangle and
after I stop draggging it, the triangle and angles are redisplayed dynamically.
I just don´t know how to drag a Point (represented as a Circle) along the Perimeter of a Circle.
Thank you,
Rogério