`(require 'space-filling)`

The algorithms and cell properties are described in
http://people.csail.mit.edu/jaffer/Geometry/RMDSFF.pdf

— Function: **make-cell**` type rank side precession`

— Function:**make-cell**` type rank side`

— Function:**make-cell**` type rank`

— Function:

— Function:

typemust be the symbol`diagonal`

,`adjacent`

, or`centered`

.rankmust be an integer larger than 1.side, if present, must be an even integer larger than 1 iftypeis`adjacent`

or an odd integer larger than 2 otherwise;sidedefaults to the smallest value.precession, if present, must be an integer between 0 andside^rank-1; it is relevant only whentypeis`diagonal`

or`centered`

.

— Function: **make-cell**` Hamiltonian-path-vector precession`

— Function:**make-cell**` Hamiltonian-path-vector`

— Function:

typemust be a vector ofside^ranklists ofrankof integers encoding the coordinate positions of a Hamiltonian path on therank-dimensional grid of points starting and ending on corners of the grid. The starting corner must be the origin (all-zero coordinates). If the side-length is even, then the ending corner must be non-zero in only one coordinate; otherwise, the ending corner must be the furthest diagonally opposite corner from the origin.

`make-cell`

returns a data object suitable for passing as the first argument to`integer->coordinates`

or`coordinates->integer`

.

Hilbert, Peano, and centered Peano cells are generated respectively by:

(make-cell 'adjacentrank2) ; Hilbert (make-cell 'diagonalrank3) ; Peano (make-cell 'centeredrank3) ; centered Peano

In the conversion procedures, if the cell is `diagonal`

or
`adjacent`

, then the coordinates and scalar must be nonnegative
integers. If `centered`

, then the integers can be negative.

— Function: **integer->coordinates**` cell u`

`integer->coordinates`

converts the integeruto a list of coordinates according tocell.

— Function: **coordinates->integer**` cell v`

`coordinates->integer`

converts the list of coordinatesvto an integer according tocell.

`coordinates->integer` and `integer->coordinates` are
inverse functions when passed the same `cell` argument.