Skip to content

gosper_decode

function gosper_decode(
t,
level,
size,
orientation?): Point;

Defined in: gosper.ts:263

Maps a position along the Gosper curve back to its cell centre — the inverse of gosper_encode. Paper Section 3.3.

ParameterTypeDefault valueDescription
tnumberundefinedCurve index, in [0, 7^level).
levelnumberundefinedCurve level.
sizenumberundefinedLevel-0 hexagon size, from gosper_size.
orientationHexOrientation"flat"Which way up the hexagons sit. Defaults to "flat".

Point