Skip to content

micycle1/space-filling-curves

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This fork improves the "library-ness" of the original project, offering a getLineSegments() method for access to the curve segments in other applications.


Space Filling Curves

There is a mathematical curious thing called "Space Filling Curves" that caught my attention several years ago, and ever since I've been studying its mathematical properties.

Some people in MIT defines it the following way:

"A space-filling curve is a parameterized function which maps a unit line segment to a continuous curve in the unit square, cube, hypercube, etc, which gets arbitrarily close to a given point in the unit cube as the parameter increases."

A more simple (yet incomplete) explanation would be:

A 1-dimensional geometrical figure that fills a 2-dimensional or higher space when its length increases to a limit based on a parameter, and never crosses itself.

The first person that discovered this kind of mathematical curiosities was Giuseppe Peano. One of his first discoveries was the following curve:

Fig1 (Three iterations of the Peano curve construction, whose limit is a space-filling curve.)

And after him there have been many others that have contributed with their own designs, some examples are: David Hilbert and Wacław Sierpiński.

My contribution

Once I got into the computer programming behind the creation of these curves the results were very surprising.

The first one I programmed is a very well known curve on the internet:

Fig2

It is built by dividing in 3 parts a right triangle and uniting it's centroid points.

Here are the first three iterations:

Fig3 (Iteration 1)

Fig4 (Iteration 2)

Fig5 (Iteration 3)

My Own Designs

Using the same methodology, let's see what happens when we divide the same right triangle into 4 parts. The design becomes very interesting, some kind of "cellular" like patterns appear after several iterations.

Fig6

Here are the first three iterations:

Fig7 (Iteration 1)

Fig8 (Iteration 2)

Fig9 (Iteration 3)

Even more interesting patterns appear when the right triangle is divided into 5 parts.

Fig10

Again, here are the first three iterations:

Fig11 (Iteration 1)

Fig12 (Iteration 2)

Fig13 (Iteration 3)

Now, I realized that the "speed" in which these curves converge to the limit where they completely fill the 2-dimensional space has no need to be a constant, what do I mean by that?, take any of the curves above, every part of the curve as a result of the division (by 3, 4 or 5) of the whole area into smaller parts is more or less the same in terms of length.

The following curves vary in length dramatically depending of the particular sub-section of the area you chose to look, yet, they are also space-filling curves. The fractal appearance is more evident on these cases:

Fig14

Fig15

Again, here are the first three iterations for each one of these curves:

Fig16 (Iteration 1)

Fig17 (Iteration 2)

Fig18 (Iteration 3)

Fig16 (Iteration 1)

Fig17 (Iteration 2)

Fig18 (Iteration 3)

Next Steps

  • Analyzing more in detail the mathematical properties of my designs.
  • And of course, creating new designs.

Comments

Please send any comment about this article to aaguilerav@me.com or alejandro.aguilera.vega@gmail.com. Your contributions or critics are always welcome.