Generalized Gosper Curves and Trisected Variants

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The space-filling seven-segment Gosper curve and its generalized extensions are modified and dissected into three identical parts. Included are fractal space-filling curves based on 13, 19, 31 and 37 segments.

Contributed by: Dieter Steemann (November 2016)
Open content licensed under CC BY-NC-SA



In the limit, the space-filling fractal Gosper curve (also known as the Peano–Gosper curve) covers the interior of the Gosper island (also known as a "flowsnake"). The basic Gosper curve can be generalized to fractal curves based on the iteration of 13, 19, 31, 37, … segments [1]. There exist several versions of the 31 and 37 segment curves, either having different outlines or traversing its area by different paths. All these curves can be replaced by three identical subcurves (by trisection) that together cover the same area as the corresponding generalized Gosper curve. This Demonstration only includes a selection from the full variety of Gosper curves and their trisections. Some curves marked as "trial" use the same number of segments and cover the same area as the corresponding Gosper curve but have different outlines.

Triplets of trisected subcurves define a closed path that you can view as filled polygons (select color mode: "color fill"). This mode is rejected for "normal" Gosper curves that do not show a closed path. All curves except sample "Gosper 37b trisect c" are self avoiding or touch only at specific points, as you can see using the rounding option. The curves are generated using an L-system and so are self-similar by construction.


[1] Fukuda, M. Shimizu and G. Nakamura, "New Gosper Space Filling Curves," Proceedings of the International Conference on Computer Graphics and Imaging (CGIM2001), 2001, pp. 34–38.

[2] Wikipedia. "L-System." (Nov 14, 2016)

[3] Wikipedia. "Gosper Curse." (Nov 14, 2016)

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.