Gosper curve

from Wikipedia, the free encyclopedia
A level 4 Gosper curve.
The section between the red and green points has been replaced by the level 1 curve.

The Gosper curve is a fractal and space-filling curve . It is named after Bill Gosper . Similar to the Dragon Curve and Hilbert Curve , it is created by substitution.

Algorithms

Lindenmayer system

The Gosper curve can be described by a Lindenmayer system with the following properties:

  • Angle: 60 °
  • Start string:
  • Derivation rules:

A program for generating the Gosper curve in Logo :

 to rg :st :ln
 make "st :st - 1
 make "ln :ln / 2.6457
 if :st > 0 [rg :st :ln rt 60 gl :st :ln  rt 120 gl :st :ln lt 60 rg :st :ln lt 120 rg :st :ln rg :st :ln lt 60 gl :st :ln rt 60]
 if :st = 0 [fd :ln rt 60 fd :ln rt 120 fd :ln lt 60 fd :ln lt 120 fd :ln fd :ln lt 60 fd :ln rt 60]
 end

 to gl :st :ln
 make "st :st - 1
 make "ln :ln / 2.6457
 if :st > 0 [lt 60 rg :st :ln rt 60 gl :st :ln gl :st :ln rt 120 gl :st :ln rt 60 rg :st :ln lt 120 rg :st :ln lt 60 gl :st :ln]
 if :st = 0 [lt 60 fd :ln rt 60 fd :ln fd :ln rt 120 fd :ln rt 60 fd :ln lt 120 fd :ln lt 60 fd :ln]
 end

The program can be rg 4 300called with, for example . Alternatively also with gl 4 300.

Gosper Island

Self-similarity: Seven small Gosper Islands come together again to form a large Gosper Island.

The area enclosed by the Gosper curve is called Gosper Island and is a variant of Koch's snowflake . The area is suitable for parquet floors .

Web links