# Intersection of Three Periodic Lines

This question is related to my earlier question, but on rethinking the problem I have come up with another solution that would be also acceptable.

I have three broken lines. Each has a constant gap of length $a$, a constant fill of length $b$ between them, and an offset $c$. Each line is something like $\lbrace t \mid a k < t+c < (a+b)k, k \in \mathbb{Z} \rbrace$ In the diagram below, I have plotted three example lines with respect to $t$.

In the diagram below, the areas where all three lines overlap is highlighted. I am interested in the first $t\ge0$ where this happens (perhaps that can be found from a general form of the lines' intersection). The lines plotted (top to bottom) have constants $a,b,c$ in pixels: $(60,72,-51)$, $(36,12,-4)$, and $(41,17,-18)$. The first $t$ satisfying all three lines is 196, so that would be the answer.

Basically, I'd be looking for the set intersection of the lines, as expressed above. I haven't been able to figure out how to do this. Another way might be to convolve three rectangle waves, and look at the result. Thoughts?

-
In general, I believe describing the intersection is a very hard dynamical systems problem, particularly if the ratios $b/c$ are independent over $\mathbb Q$ for the different lines. –  Alex Becker Aug 4 '12 at 22:18
Are the lines always at a constant value? If so, then add all three of them: $f(t) = l_1(t)+l_2(t)+l_3(t)$. The intersecting areas will be the values of $t$ for which $f(t)$ is at its maximum. –  Arkamis Aug 4 '12 at 22:21
Yes; the lines' $a$, $b$, and $c$ values remain constant. By add, I assume you mean add some equivalent rectangle waves, and find where their sum is first three. –  Ian Mallett Aug 5 '12 at 7:37