How would I calculate points on the Peano curve?

278 Views Asked by At

The Peano curve is often given as an example of a space filling curve which maps the unit line to the unit square. So, it is a function of the form $[0,1] \rightarrow [0,1]^2$? In which case can I evaluate it for given numbers like 0.2, 0.5 and 0.7? How would I calculate those points?

1

There are 1 best solutions below

0
On

The approach I would take is to define the curve construction by a set of affine similarity transformations, each corresponding to a mapping from the unit square to part of the curve. Write the length parameter fraction in base(number of transformations) to index a sequential compositions of transformations, and take the limit to find the corresponding point in the unit square.

Using the Hilbert curve as an example because it has fewer and simpler transformations (the same approach applies to the Peano curve with $9$ transformations):

$$ \begin{aligned} f_0 \begin{pmatrix}x \\ y\end{pmatrix} &= \begin{pmatrix}0 & \frac{1}{2} \\ \frac{1}{2} & 0\end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} \\ f_1 \begin{pmatrix}x \\ y\end{pmatrix} &= \begin{pmatrix}\frac{1}{2} & 0\\ 0 & \frac{1}{2} \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} + \begin{pmatrix}0 \\ \frac{1}{2}\end{pmatrix}\\ f_2 \begin{pmatrix}x \\ y\end{pmatrix} &= \begin{pmatrix}\frac{1}{2} & 0\\ 0 & \frac{1}{2} \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} + \begin{pmatrix}\frac{1}{2} \\ \frac{1}{2}\end{pmatrix}\\ f_3 \begin{pmatrix}x \\ y\end{pmatrix} &= \begin{pmatrix}0 & -\frac{1}{2}\\ -\frac{1}{2} & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} + \begin{pmatrix}1 \\ \frac{1}{2}\end{pmatrix}\\ \end{aligned} $$

Weight the transformations equally across the length parameter, because each maps to the same area. Now there are $4$ transformations, so write your parameter fraction in base $4$:

$$l = 0 . l_1 l_2 l_3 l_4 \ldots \text{ where } l_i \in \{0,1,2,3\}$$

which corresponds to a composition of transfomations:

$$f = f_{l_1} \circ f_{l_2} \circ f_{l_3} \circ f_{l_4} \circ \ldots$$

This infinite limit can be evaluated for rational length parameters using fixed point arguments, for example:

$$l = \frac{7}{12} = 0.2\overline{1}_4 \\ p_1 = f_1 (p_1) = \begin{pmatrix}0 \\ 1\end{pmatrix} \\ p = f_2 (p_1) = \begin{pmatrix}\frac{1}{2} \\ 1 \end{pmatrix}$$

For irrational length parameters, I don't know how to find the limit.