NEW GOSPER SPACE FILLING CURVES
HIROSHI FUKUDA MICHIO SHIMIZU GISAKU NAKAMURA
School of Administration and Informatics, Department of Liberal Art, Research Institute of Education,
University of Shizuoka, Nagano Prefecture College, Tokai University,
52-1 Yada, Shizuoka-shi, Shizuoka, 8-49-7 Miwa, Nagano-shi, Nagano, 2-28-4 Tomigaya, Shibuya-ku, Tokyo,
422-8526 JAPAN 380-8525 JAPAN 151-8677 JAPAN
We investigate several properties of a beautiful space
filling curve known as the Gosper curve, and try to
construct curves having the same properties. We found
17 new Gosper curves through computer searches, and an
infinite series of curves that are natural extensions of the
original Gosper curve.
KEY WORDS: Gosper curve, Space filling curves,
The Gosper curve is a space filling curve discovered by
William Gosper, an American computer scientist, in 1973,
and was introduced by Martin Gardner in 1976 [1,2]. The
Gosper curve is said to be a very beautiful and complex
monster curve because it has several special properties
that other space filling curves such as the Peano curve and
the dragon curve do not have.
In this paper, we point out several properties of the
Gosper curve and try to construct curves having the same
properties. Then, we show 17 new Gosper curves that we
found through computer searches. We also show an
infinite series of curves that are natural extensions of the
original Gosper curve.
In section 2, we describe the Gosper curve. In section 3,
we propose a construction method for new Gosper curves.
In section 4, results are shown and discussed.
2. GOSPER SPACE FILLING CURVES
The Gosper curve is a recursive curve constructed by
recursively replacing a dotted arrow, called the initiator,
by seven arrows, called generator, as shown in Fig. 1(a).
Fig. 1(b) and Fig. 1(c) illustrate the curves obtained by
replacing the initiator by generator once and twice
(a) (b) (c)
Fig. 1 Gosper curve.
The arrows of generator in the curve obtained after
replacing the initiator to the generator any times are
located on the edge of a regular triangular lattice. The
degree of the generator arrow at the lattice point is two in
the interior of the Gosper curve and is one at the both
ends of initiator, i.e., the Gosper curve is the path from
the root to the tip of the initiator without any branches
visiting all interior lattice points. To our knowledge, the
Gosper curve is the only space filling curve to have these
properties. Therefore, in this paper we define the Gosper
curve in terms of these properties. We then try to find new
Gosper curves which satisfy our definition other than the
Gosper curve found by William Gosper. We call the
number of arrows included in the generator the size of
generator or Gosper curve itself.
3. COMPUTER SEARCH FOR NEW
We attach an equilateral triangle to the initiator arrow
and to the generator arrow so that the triangle has the
arrow as its edge and so that the direction of the arrow is
counterclockwise in the triangle as shown in Fig. 2 (a).
We call the equilateral triangle attached to each arrow a
Fig. 2 Flags.
In the recursive procedure constructing Gosper curve,
the flag for the initiator is replaced by the seven flags for
the generator. The area of the flags is conserved during
the replacement. Further, the flags fill the triangular
lattice alternatively as shown in Fig. 2(b). From these
simple flag properties, the following procedure to
construct the generator of the Gosper curve can be
(P1) Chose the size of the Gosper curve N.
(P2) Prepare an initiator arrow of length
and attach the
initial flag to it.
(P3) Prepare N flags with side length NL/ to be used
in the generator. The N flags should satisfy
conditions (P4) to (P7). Bellow, we call the set of N
flags “generator flags”.
(P4) The generator flags should be connected at their
(P5) Two vertices of generator flags should coincide with
the ends of the initiator. From this condition the size
of Gosper curve is restricted to
xyyxN ++= 22 , ,...2,1,0, =yx (1)
Therefore the possible sizes of Gosper curves are
(P6) The shape of the generator flags is symmetric under
rotation around its geometrical center.
(P7) If two coincident generator flags exist and one is
translated by a distance L in a direction parallel to
one of the three edges of a triangle in the initiator
flag, then the two generator flags should not overlap.
(P8) By taking only one edge from each flag and by using
the N edges of the generator flags, construct a path
without branches from the root to the tip of the
(P9) Convert the edges in the path to the arrow so that the
direction of the arrow is counterclockwise in the flag.
We then obtain the generator arrow.
Using this procedure, we obtain the seven generator
flags shown in Fig.3 for 7≤N. The generator flags
which corresponds to the William Gosper’s curve is the
only generator flags satisfying conditions (P8) and (P9).
3=N 4=N 7=N
Fig. 3 Generator flags for 7≤N.
4. RESULTS AND DISCUSSIONS
As we have already mentioned, the smallest Gosper
curve obtained by the procedure given in the previous
section is the curve with 7=N found by William Gosper.
N, there are two curves for 13
N. We show these curves together with their
generators and generator flags in Fig. 4 and Fig. 5,
Fig. 4 A new Gosper curve for
Fig. 5 A new Gosper curve for
N, there are seven and eight curves for
N and 37, respectively. The seven curves for
N are constructed by the three generator flags
shown in Fig.6 (31a), (31b) and (31c). Gosper curves
which have the same size can be distinguished by using
the flag and a serial number, for example (31a-1). It is
notable that five new Gosper curves can be produced
from the generator flags (31b). The curves produced from
the same generator flags have similar shapes.
Fig. 6 New Gosper curves for 31=N.
Eight curves for 37=N are constructed from the four
generator flags shown in Fig.7 (37a), (37b), (37c) and
(37d). The generator flags (37a), (37b), (37c) and (37d)
construct 1, 2, 3 and 2 curves, respectively. Although we
did not search for curves with 37>N because of the
limitation of our computer power, we expect that there
exist many big and complex Gosper curves.
Fig. 7 New Gosper curves for 37=N.
Next, we compare the three curves with sizes 7
19=N and (37a-1). We found that the generator of the
curve for 19=N contains the generator of the curve for
7=N, and that the generator for (37a-1) contains the
generator for 19=N. Similarly, the generator flags of the
curve for 19=N are obtained by adding a layer of flags
around the generator flags of the curve for 7=N, and the
generator flags for (37a-1) are obtained by adding a layer
around the generator flags for 19
N. Thus the curve for
19=N and the curve (37a-1) are natural extensions of
the Gosper curve for 7=N.
It is possible to make the natural extension of the
Gosper curve for 7=N by adding a layer several times.
We explain the extension method as an example of the
curve for 37=N. First, we add a layer of flags around
the generator flags for 37=N as shown in Fig. 8. The
resulting generator consists of 61 flags. Thus we will
obtain the Gosper curve of the size 61=N. Next, we
choose the ends of initiator to be the leftmost vertex on
the button edge and the rightmost vertex, then we draw a
dotted line from the ends of the initiator to the ends of the
curve already drawn for 37=N as shown in Fig. 8.
After converting each segment of the dotted line to the
arrow, we obtain the generator of Gosper curve for
N. It is clear that bigger curves can be obtained by
continuing this procedure.
Fig. 8 Natural extension of the Gosper curve
As mentioned above, by adding n layers to the
generator flags for 7
N, we obtain a generator with size
133 2++= nnN ,...)3,2,1( =n. (3)
Thus we can obtain an infinite series of Gosper curve with
the size given by equation (3). The shape of the curves
obtained looks like snail.
In this paper, we pointed out several properties of the
monster curves found by William Gosper, and constructed
new monster curves having the same properties. We
found that the smallest size of the new monster curves is
13 and obtained an infinite series of natural extensions of
the Gosper curve. These new recursive monster curves are
beautiful and will be useful for computer graphics.
We should note that Gosper curve for 137
exist since the procedure (P1)—(P9) is not a necessary
and sufficient condition for our definition of the Gosper
curve. Finding a procedure corresponding to the necessary
and sufficient conditions and applying the procedure to
the other regular lattices are topics of future research.
 M. Gardner, In which “monster” curves force
redefinition of the word “curve”, Scientific American
235 (December issue), 1976, 124-133.
 B. B. Mandelbrot, The fractal geometry, (New York ,
W. H. Freeman and Company, 1977).