This program generates the H-curve described in the paper "Towards Optimal Locality in Mesh-Indexings" [NRS97] by R. Niedermeier , K. Reinhardt and P. Sanders . The program provides 3 algorithms: One very simple algorithm, which only works for squares, which are a power of the 2, one algorithm, which works for even squares, and one algorithm, which works for any rectange, where the y-size is taken from the same input field as the squaresize and the x-size is taken from the second input field. If both values are not even, the curve can not be cyclic and will end in distance 2 (or sometimes more) right from the start.

The source. Demos.
Last modified: 22-May-97 by Klaus Reinhardt