0

How do you determine the number of degrees that overlap between two circular slices like what is shown in the example below by the hatched area?

EDIT:

Note, the slices are orientated by a center line with equal number of x degrees on both sides as shown by the colored dotted line in the example.

The slices can vary up to a maximum angle of 180 degrees (90 degrees to each side of the centerline) and orientated at any angle.

enter image description here

3 Answers3

1

Let the sectors be $\theta_1\pm\Delta\theta_1$ and $\theta_2\pm\Delta\theta_2$ in your notation. The angle between the sector centers is $\phi = |\mathrm{wrap}(\theta_1-\theta_2)|$, where $$\mathrm{wrap}(\theta) = \begin{cases} \theta & \text{if $-180^\circ\le\theta\le180^\circ$,} \\ \theta+360^\circ & \text{if $\theta < -180^\circ$,} \\ \theta-360^\circ & \text{if $\theta > 180^\circ$} \end{cases}$$ is the angle normalized to lie between $-180^\circ$ and $180^\circ$. Then the angle of overlap is simply $\Delta\theta_1+\Delta\theta_2-\phi$; if this is negative, there is no overlap.

  • This doesn't handle the situation where one sector is fully embedded within the other. Take for example, one sector at 45 $\pm$ 30, and another at 45 $\pm$ 10. Your equations result in an overlap of 40, when the actual overlap is 20. – Mark Mar 31 '20 at 15:43
0

Hint: You need to find the minimum angle of the red, which is $40^\circ-55^\circ=-15^\circ$ and the maximum angle for the blue, which is ???. The overlap is the difference between them. It is harder for sectors than intervals because you can have two overlaps and you can pass through $360^\circ$

Ross Millikan
  • 374,822
0

The way that I solved it was to develop an algorithm that could handle all of the overlap situations. This turned out to be more of a programming exericse rather than a mathematical problem.