spacefill-0.1: Generators for space-filling curves.

Copyright(c) Raphael 'kena' Poss 2014
LicensePublic domain (Unlicense)
Maintainerknz@thaumogen.net
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.SpaceFillingCurves

Description

Generators of space-filling curves.

Synopsis

Documentation

hilbert :: (Eq n, Num n, Fractional f, Alternative p) => n -> f -> f -> f -> f -> f -> f -> p (f, f) Source

Generate a Hilbert space-filling curve. (open curve)

The function generates 4^n points, shifted from the origin by (x0, y0). The pair (xi, yi) determines the planar coordinates of the I vector ("X axis") and the pair (xj, yj) the coordinates of the J vector ("Y axis").

moore :: (Eq n, Num n, Fractional f, Alternative p) => n -> f -> f -> f -> f -> f -> f -> p (f, f) Source

Generate a Moore space-filling curve. (closed curve)

The function generates 4^n points, shifted from the origin by (x0, y0). The pair (xi, yi) determines the planar coordinates of the I vector ("X axis") and the pair (xj, yj) the coordinates of the J vector ("Y axis").