Cut a torus and unroll it and you get a flat square whose opposite edges are the SAME edge — walk off the right, come back on the left; off the top, back on the bottom. A ‘straight line’ on this square is a geodesic on the torus. If its slope is a fraction it eventually closes into a loop; if the slope is irrational it never closes and fills the whole square. Slide the slope and watch it close or go dense.
The flat torus is the unit square with opposite edges identified (the fundamental polygon). A line of rational slope q/p is a (p,q) closed geodesic: it winds p times one way and q the other and closes after passing through the identified corners; the number of separate loops is gcd(p,q). An irrational slope is a geodesic that never returns to its start and is DENSE — it comes arbitrarily close to every point (a Kronecker/equidistribution flow). A fail-loud self-check throws unless gcd(p,q) gives the loop count (gcd(2,3)=1 one loop, gcd(4,6)=2 two loops). ◆ real topology, node-verified.
Rational slopes are drawn exactly; the ‘irrational’ case is approximated by a high-denominator slope so it reads as dense on a finite screen — true density is a limit, honestly noted.