This fork improves the "library-ness" of the original project, offering a getLineSegments()
method for access to the curve segments in other applications.
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:
(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.
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:
It is built by dividing in 3 parts a right triangle and uniting it's centroid points.
Here are the first three iterations:
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.
Here are the first three iterations:
Even more interesting patterns appear when the right triangle is divided into 5 parts.
Again, here are the first three iterations:
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:
Again, here are the first three iterations for each one of these curves:
- Analyzing more in detail the mathematical properties of my designs.
- And of course, creating new designs.
Please send any comment about this article to aaguilerav@me.com or alejandro.aguilera.vega@gmail.com. Your contributions or critics are always welcome.