Lines are thought of as one dimensional, and therefore, a 1D line cannot fill the whole of a 2D shape.
Not so. In 1890 Guiseppe Peano discovered a space-filling curve. It was far too fine and far to wiggly to be seen with the naked eye, but it was still, technically, a curve.
In 1891 the German mathematician David Hilbert (famous Mathmetician) found another one.
Here is an animation of the first 9 stages of the forming of Hilbert's curve.

Those are 2d lines though. They have width. TM


Hilbert's Space Filling curve (first nine stages)
Hilbert's Space Filling curve (first nine stages)
by Ananth Balakrishnan 8J