Implemented Hilbert curve.