working hilbert curve to the ith order