# Help understanding “Peano curve” picture

I am trying to understand a particular version of the "Peano curve." Although definitions will vary from person to person, for the purposes of this question I am talking about the one obtained from the process in the picture below. More specificically, I am concerned with a curve which maps the unit interval surjectively onto the unit square $$[0,1] \times [0,1]$$.

Now, I find the above figure a little confusing because there are no axes or points labeled, thus it is hard to tell what points the curves touch.

For the first curve pictured, I would describe it by taking a straight path from $$(0,0)$$ to $$(0,1)$$, then from $$(0,1)$$ to $$(1/2,1)$$, then from $$(1/2,1)$$ to $$(1/2,0)$$, then from $$(1/2,0)$$ to $$(1,0)$$, and finally from $$(1,0)$$ to $$(1,1).$$

I am having trouble describing the second curve, however. I would start by taking a straight paths from $$(0,0) \to (0,1/3) \to(1/6,1/3) \to(1/6,0) \to(1/3,0) \to (1/3,1/3)$$. So far so good? Now, I think I'm supposed to continue by going $$(1/3,1/3) \to (1/3,2/3) \to(1/6,2/3) \to (1/6,1/3) \to (0,1/3) \to (0,2/3)$$. But wait a second! This curve overlaps! This is different from the picture!

So, if the picture is wrong, how does one correct it? I'm also unsure where I'm supposed to go once I reach $$(1/3,1)$$. Do I move back down (even though I just came that way) or do I move to the right?

Yeah, your picture is wrong. If you draw curve $$n$$ (the first being number $$1$$) on a piece of engineering paper such that it fit on the smallest scale possible, the first graph would be $$2\times2$$, the second $$8\times8$$ and the third $$26\times26$$ and so on. You need to fit $$3$$ graphs of curve $$n$$ plus $$2$$ units of spacing so that if $$a_n$$ is the width and height of graph $$n$$ then $$a_{n+1}=3a_n+2$$ The solution to this difference equation is $$a_n=3^n-1$$ so graph $$n$$ must be shrunk by a factor of $$\frac{a_n}{a_{n+1}}=\frac{3^n-1}{3^{n+1}-1}$$ before inserting it or its mirror image into graph $$n+1$$.
Thus the first graph should have been shrunk by a factor of $$2/8=1/4$$ so that its corners would be $$(0,0),(0,1/4),(1/8,1/4),(1/8,0),(1/4,0),(1/4,1/4)$$. Then leave a spacing of $$1/8$$ and draw the mirror image above. Repeat until you get to the top, the leave a spacing of $$1/8$$ of the right and draw the mirror image of the last subgraph on the right and so on until all $$9$$ subgraphs have been draw. Also draw those little connecting segments.