HilbertCurve
Type members
Classlikes
Encodes two dimensional coordinates as one dimensional indices or positions of a Hilbert curve.
Encodes two dimensional coordinates as one dimensional indices or positions of a Hilbert curve.
The output positions are integers between zero (inclusive)
and n-times-n (exclusive). The UGen ends when either x
or y
ends.
- Value parameters:
- n
the square matrix size, which must be a power of two
- x
the integer horizontal coordinate in the n-by-n matrix
- y
the integer vertical coordinate in the n-by-n matrix
- Companion:
- object
Decodes one dimensional indices or positions of a Hilbert curve to two dimensional coordinates.
Decodes one dimensional indices or positions of a Hilbert curve to two dimensional coordinates.
The output coordinates are integers between zero (inclusive)
and n (exclusive). The UGen ends when pos
ends.
- Value parameters:
- n
the square matrix size, which must be a power of two
- pos
the integer position on the hilbert curve from zero (inclusive) to n-times-n (exclusive).
- Companion:
- object