Sunday, February 5, 2012

How a hilbert curve can be used to represent linear space in 2D

Consider a set of numbers from say 0 to 16 and you want to represent that using a square. Then we could represent those numbers using a 2nd order hilbert curve as follows:

0---1   14--15
    |   |
3---2   13--12
|            |
4   7---8   11
|   |   |    |
5---6   9---10
 
 
 
How higher order hilbert curves (fractals) can be built from lower order ones 
is nicely shown in the following animation from wikipedia:
 
 

0 comments:

Post a Comment