Flowsnake Q-Function

The flowsnake (also called a Gosper curve) is a space-filling curve, a surjection from . The flowsnake -function, a surjection , determines a complex value, , for points along the curve with preimages that belong to the restricted domain. All valid preimages can be written in the form . When is an integer and , the function values for the set of preimages determine a traditional flowsnake interpolation. These points can be computed using a simple Lindenmayer system or a so-called -function. Computation of other exact function values requires the -function, provided here.
The -function enables the computation of a wide variety of nontraditional interpolations, with interesting features that simple Lindenmayer outputs do not display. For example, the range of the -function contains points with two or three preimages, double and triple points. Try computing these values:
, , .


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


[1] M. Beeler, R. W. Gosper, and R. Schroeppel. "Item #115". HAKMEM MIT AI Memo 239. Feb. 29, 1972. Retyped and converted to html ('Web browser format) by Henry Baker, April, 1995. home.pipeline.com/~hbaker1/hakmem/topology.html#item115.
[2] B. Klee, "A Pit of Flowsnakes," Complex Systems, 24(4), 2015 pp. 275–294. doi:10.25088/ComplexSystems.24.4.275.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.