Answer the question
In order to leave comments, you need to log in
How to find the intersection of shapes?
I have panel1.
g.DrawEllipse(aquaPen, e.X - 50, e.Y - 50, 100, 100);
Answer the question
In order to leave comments, you need to log in
to find out whether the circle and the triangle intersect or not, you need to solve 3 systems of equations: the
first:
(x-x0)^2+(y-y0)^2=R^2
(y-Ay)/(By-Ay)=(x -Ax)/(Bx-Ax)
second:
(x-x0)^2+(y-y0)^2=R^2
(y-Cy)/(By-Cy)=(x-Cx)/(Bx -Cx)
third:
(x-x0)^2+(y-y0)^2=R^2
(y-Cy)/(Ay-Cy)=(x-Cx)/(Ax-Cx)
where x0, y0 the center of the circle
A, B and C are the coordinates of the vertices of the triangle
, and if at least one has a solution, then they intersect
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question