Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there algorithm that decide if two sectors intersect? I can transform the sector into polygons and use standard algorithms, but it has some cons. Any other ideas?

share|cite|improve this question
You mean circular sectors? – J. M. Sep 8 '11 at 10:24

I'll assume you mean circular sectors. The sectors intersect if and only if either a) their boundaries intersect or b) one is a subset of the other.

For a), each boundary consists of a line segment and a circle segment. You can intersect each of the four pairs of the corresponding lines and circles and check whether any of the intersection points lie within the segments.

If not a), then either b) or the sectors are disjoint. So you just have to test both ways whether some point of one sector lies within the other -- this you can do by testing whether the point is inside the circle and on the appropriate side of the line.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.