This question is related to this one.
I'm tutoring some first year university students calculus, and next week, discussing continuity, I plan to talk about Thomae function:
$$ f(x) = \begin{cases} \frac{1}{q} & \text{ if } x\in \mathbb{Q},\ x = \frac{p}{q},\ p \in \mathbb{Z},\ q \in \mathbb{N},\ \gcd(p, q) = 1 \\ 0 & \text{ if } x\not\in \mathbb{Q} \text{ or } x=0 \end{cases} $$
Proving that the function is continuous at each irrational point, I wanted to give them some intuition about it before going into the proof. I was plotting some graph, including the one below where
- the red point is $(\sqrt{\pi},0)$
- the blue points are $\left(\frac{p}{q},\frac{1}{q}\right)$ for $q=10,11,\ldots,200$ (I removed the first ten point to have a nicer plot), so there are the point $\left(\frac{[q*\sqrt{\pi}]}{q},\frac{1}{q}\right)$, where $\left[ \cdot \right]$ is the round function.
My goal was to exhibit that the closer $x$ get to the irrationnal number $\sqrt{\pi}$, the higher $q$ has to be.
But some line pattern are really clear in the plot,
This is valid for any irrational number, it's even better when taking $\pi$ as irrational limit. (in here the higher $q$ is the smaller the point is)

And with some zoom ($q=100,\ldots,1000$)

In the mentionned related question, Jack D'Aurizio gave a nice intuition for the existence of line in Thomas function, however, I wonder if anyone as some additionnal details. What do they converge to ? Intuitively I would have guess to $(0,\pi)$, but it does not look to be the case...
I'd like to understand the phenomena better, it is probably quite trivial with some property of rational, but I won't have much time before next week. So any input is welcome. Thanks
Edit: in the last plot I've added the first label of $q$ to understand how they behave. The pattern is expected, going left until the round function jumps, but still not sure how to explain the vertical lines.
