Because the Sierpiński curve is space-filling, its Hausdorff dimension (in the limit
For example, it has been used as a basis for the rapid construction of an approximate solution to the Travelling Salesman Problem (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.
[3] 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.
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 Sierpiński arrowhead curve draws an equilateral triangle with triangular holes at equal intervals.
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.
An alternate construction is given in the article on the de Rham curve: 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.
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: The Sierpiński arrowhead curve can be expressed by a rewrite system (L-system).