Gosper curve

The Gosper curve named after Bill Gosper is a fractal object that is created similar to the dragon curve and the Hilbert curve 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:

Logo

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 started for example with rg 4300. Alternatively, with gl 4 300

273799
de