+ 1

How to find if circle intersects with triangle in C?

Help? User input three coordinates for a triangle(x, y) and coordinates of center of a circle(x0, y0) and circle radius, program output should be "Yes" if circle intersects triangle or "No" if not.

17th Nov 2020, 3:41 PM
Veljko Milanov
Veljko Milanov - avatar
3 Answers
+ 2
I think you need to consider the equation for the circumference described by the certer and the radius. Then you have to compare it with the equations of the lines that make the triangle. If you find that equatOfCircle = equatOfOneSide for a point in the plan, then the triangle intersects the circle. Post an attempt for more support.
17th Nov 2020, 6:11 PM
Davide
Davide - avatar
+ 1
The question is unclear. Explain more and show your attempt.
17th Nov 2020, 5:31 PM
Davide
Davide - avatar
0
I only did the input, i dont have idea which formula to use to see if circle intersects triangle. What program is supposed to do is in description.
17th Nov 2020, 5:46 PM
Veljko Milanov
Veljko Milanov - avatar