Overlap between two periodic intervals

42 Views Asked by At

Let $t_1$, $t_2$, $t_3$ and $t_4$ be the angular coordinates of 4 points on the unit circle. These points form two arcs $A_1 = (t_1, t_2)$ and $A_2 = (t_3, t_4)$. I would like to write an equation for the arc length of the overlap between the two arcs.

The best I have come up with so far is:

  1. For each arc, if it crosses the angular coordinate 0, split it into two arcs $(t_l, 2\pi)$ and $(0, t_r)$. Thus, any of the original arcs may be split into one or two arcs.
  2. For each pair of arcs that come from different original arcs, find overlap normally, as if they were not periodic
  3. If multiple overlaps are obtained this way, add them up.

While this procedure works, I find it quite inelegant. I can't escape the feeling that there should be a simpler procedure to do this, but it evades me.