HOME

TheInfoList



OR:

Sierpiński curves are a
recursively Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics ...
defined
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is calle ...
of continuous closed plane
fractal curve A fractal curve is, loosely, a mathematical curve whose shape retains the same general pattern of irregularity, regardless of how high it is magnified, that is, its graph takes the form of a fractal. In general, fractal curves are nowhere rectif ...
s discovered by
Wacław Sierpiński Wacław Franciszek Sierpiński (; 14 March 1882 – 21 October 1969) was a Polish mathematician. He was known for contributions to set theory (research on the axiom of choice and the continuum hypothesis), number theory, theory of functions, and t ...
, which in the limit n \to \infty completely fill the unit square: thus their limit curve, also called the Sierpiński curve, is an example of a
space-filling curve In mathematical analysis, a space-filling curve is a curve whose range contains the entire 2-dimensional unit square (or more generally an ''n''-dimensional unit hypercube). Because Giuseppe Peano (1858–1932) was the first to discover one, spa ...
. Because the Sierpiński curve is space-filling, its
Hausdorff dimension In mathematics, Hausdorff dimension is a measure of ''roughness'', or more specifically, fractal dimension, that was first introduced in 1918 by mathematician Felix Hausdorff. For instance, the Hausdorff dimension of a single point is zero, of ...
(in the limit n \to \infty ) is 2 .
The Euclidean length of the nth iteration curve S_n is : l_n = (1+\sqrt 2) 2^n - (2-\sqrt 2) , i.e., it grows ''exponentially'' with n beyond any limit, whereas the limit for n \to \infty of the area enclosed by S_n is 5/12 \, that of the square (in Euclidean metric).


Uses of the curve

The Sierpiński curve is useful in several practical applications because it is more symmetrical than other commonly studied space-filling curves. For example, it has been used as a basis for the rapid construction of an approximate solution to the
Travelling Salesman Problem The travelling salesman problem (also called the travelling salesperson problem or TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each cit ...
(which asks for the shortest sequence of a given set of points): The heuristic is simply to visit the points in the same sequence as they appear on the Sierpiński curve. To do this requires two steps: First compute an inverse image of each point to be visited; then sort the values. This idea has been used to build routing systems for commercial vehicles based only on Rolodex card files. A space-filling curve is a continuous map of the unit interval onto a unit square and so a (pseudo) inverse maps the unit square to the unit interval. One way of constructing a pseudo-inverse is as follows. Let the lower-left corner (0, 0) of the unit square correspond to 0.0 (and 1.0). Then the upper-left corner (0, 1) must correspond to 0.25, the upper-right corner (1, 1) to 0.50, and the lower-right corner (1, 0) to 0.75. The inverse map of interior points are computed by taking advantage of the recursive structure of the curve. Here is a function coded in Java that will compute the relative position of any point on the Sierpiński curve (that is, a pseudo-inverse value). It takes as input the coordinates of the point (x,y) to be inverted, and the corners of an enclosing right isosceles triangle (ax, ay), (bx, by), and (cx, cy). (The unit square is the union of two such triangles.) The remaining parameters specify the level of accuracy to which the inverse should be computed. static long sierp_pt2code( double ax, double ay, double bx, double by, double cx, double cy, int currentLevel, int maxLevel, long code, double x, double y )


Representation as Lindenmayer system

The Sierpiński curve can be expressed by a
rewrite system In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewrite engines, or reduc ...
(
L-system An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into som ...
). :Alphabet: F, G, X :Constants: F, G, +, − :Axiom: F−−XF−−F−−XF :Production rules: ::X → XF+G+XF−−F−−XF+G+X :Angle: 45 Here, both ''F'' and ''G'' mean “draw forward”, + means “turn left 45°”, and ''−'' means “turn right 45°” (see
turtle graphics In computer graphics, turtle graphics are vector graphics using a relative cursor (the "turtle") upon a Cartesian plane (x and y axis). Turtle graphics is a key feature of the Logo programming language. Overview The turtle has three attribut ...
). The curve is usually drawn with different lengths for F and G. The Sierpiński square curve can be similarly expressed: :Alphabet: F, X :Constants: F, +, − :Axiom: F+XF+F+XF :Production rules: ::X → XF−F+F−XF+F+XF−F+F−X :Angle: 90


Arrowhead curve

The Sierpiński arrowhead curve is a fractal curve similar in appearance and identical in limit to the Sierpiński triangle. The Sierpiński arrowhead curve draws an equilateral triangle with triangular holes at equal intervals. It can be described with two substituting production rules: (A → B-A-B) and (B → A+B+A). A and B recur and at the bottom do the same thing — draw a line. Plus and minus (+ and -) mean turn 60 degrees either left or right. The terminating point of the Sierpiński arrowhead curve is always the same provided you recur an even number of times and you halve the length of the line at each recursion. If you recur to an odd depth (order is odd) then you end up turned 60 degrees, at a different point in the triangle. An alternate constriction is given in the article on the
de Rham curve In mathematics, a de Rham curve is a certain type of fractal curve named in honor of Georges de Rham. The Cantor function, Cesàro curve, Minkowski's question mark function, the Lévy C curve, the blancmange curve, and Koch curve are all spe ...
: one uses the same technique as the de Rham curves, but instead of using a binary (base-2) expansion, one uses a ternary (base-3) expansion.


Code

Given the drawing functions void draw_line(double distance); and void turn(int angle_in_degrees);, the code to draw an (approximate) Sierpiński arrowhead curve looks like this: void sierpinski_arrowhead_curve(unsigned order, double length) void curve(unsigned order, double length, int angle)


Representation as Lindenmayer system

The Sierpiński arrowhead curve can be expressed by a
rewrite system In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewrite engines, or reduc ...
(
L-system An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into som ...
). :Alphabet: X, Y :Constants: F, +, − :Axiom: XF :Production rules: ::X → YF + XF + Y ::Y → XF − YF − X Here, ''F'' means “draw forward”, + means “turn left 60°”, and ''−'' means “turn right 60°” (see
turtle graphics In computer graphics, turtle graphics are vector graphics using a relative cursor (the "turtle") upon a Cartesian plane (x and y axis). Turtle graphics is a key feature of the Logo programming language. Overview The turtle has three attribut ...
).


See also

*
Hilbert curve The Hilbert curve (also known as the Hilbert space-filling curve) is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891, as a variant of the space-filling Peano curves discovered by Giuseppe ...
*
Koch snowflake The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is a fractal curve and one of the earliest fractals to have been described. It is based on the Koch curve, which appeared in a 1904 paper titled "On a Continuous Curv ...
*
Moore graph In graph theory, a Moore graph is a regular graph whose girth (the shortest cycle length) is more than twice its diameter (the distance between the farthest two vertices). If the degree of such a graph is and its diameter is , its girth must ...
* Murray polygon * Peano curve *
List of fractals by Hausdorff dimension According to Benoit Mandelbrot, "A fractal is by definition a set for which the Hausdorff-Besicovitch dimension strictly exceeds the topological dimension." Presented here is a list of fractals, ordered by increasing Hausdorff dimension, to illus ...
* Recursion (computer science) * Sierpinski triangle


References


Further reading

* * {{DEFAULTSORT:Sierpinski curve Fractal curves Science and technology in Poland Articles with example Java code L-systems