Converting 2 COD (x,y) into 1 Hilbert curve COD?

In summary, the function for a point on a Hilbert curve is given by the equation L = f(X, Y). The inverse function is given by L inverse(X, Y). There are an infinite number of inverse functions, and the only one that is specific to this particular curve is the solution to one equation in each set.
  • #1
greswd
764
20
COD stands for co-ordinate.

As the title says, you have two co-ordinates of a point, x and y, on a unit square.

What's the formula for converting these two co-ordinates into a single Hilbert curve co-ordinate?

Which represents the percentile along the length of the Hilbert Curve that point is on.
 
Physics news on Phys.org
  • #2
Inspired by this video

 
  • #3
greswd said:
What's the formula for converting
Would this be converting 2D to 1D ?

I'm inlcined to think along lines like: write x and y as real numbers. Create a z as follows: first digit is first digit of x, second digit is first digit of y -- third digit is second of x, fourth second of y, etc. etc.

Ever hear of the Hilbert hotel ?
 
  • #4
Isn't this just the arc length parametrization of the Hilbert curve? Not that it is simple but it seems like a useful way of framing it.
 
  • #5
Ah, I completely misread this thing o:) -- totally off.
Thanks @WWGD

So @greswd , you want a function of ##\ x, y\ ## and ##n## that returns a fraction for a Hilbert curve of order ##n## starting at the lower left ?

Start with ##n = 1##, then ##2## etc and see if you can find a pattern :rolleyes:
 
  • Like
Likes WWGD
  • #6
Found some time to watch the video -- cute !
I understand you want the limit for ##n\uparrow \infty## (the ones with finite ##n## are pseudo Hilbert curves). Advice is the same.

Found one value already: ##f(1/2, 1/2) = 1/2 ## :wink:
 
  • Like
Likes greswd
  • #7
Susspect the time 4:00 -- 5:00 min in the video is important: suppose you work with base 4 numbers and work out the diagonal flip of first and last quadrant ...then make it recursive ..

Just a wake-up thought ...

Intriguing !
 
  • #8
WWGD said:
Isn't this just the arc length parametrization of the Hilbert curve? Not that it is simple but it seems like a useful way of framing it.
If arc length parametrization is what the video is doing, then yes
 
  • #9
BvU said:
Ah, I completely misread this thing o:) -- totally off.
Thanks @WWGD

So @greswd , you want a function of ##\ x, y\ ## and ##n## that returns a fraction for a Hilbert curve of order ##n## starting at the lower left ?

Start with ##n = 1##, then ##2## etc and see if you can find a pattern :rolleyes:
thanks, do you know the function for x and y in terms of the fraction and n?
 
Last edited:
  • #10
No idea yet -- first trying to get a good and complete problem statement :wink: in my chaotic mind .

Anyway, PF isn't about doing the work for you, it's about helping you to do the work :biggrin:
(however much we'd like to grab it and do it ourselves o0) )

If I ever have the time, I think I'd start reading this
The heatmap here is nice too

But you already googled those, right :rolleyes: ?
 
  • #11
BvU said:
No idea yet -- first trying to get a good and complete problem statement :wink: in my chaotic mind .

Anyway, PF isn't about doing the work for you, it's about helping you to do the work :biggrin:
(however much we'd like to grab it and do it ourselves o0) )

If I ever have the time, I think I'd start reading this
The heatmap here is nice too

But you already googled those, right :rolleyes: ?

yeah I have haha. The problem is "infinitely" difficult. :-p

Consider the ratio along the length of the HC, L.
From L, you can get a value for X and a value for Y.

So, you get a function for X in terms of L and the same for Y. Next, the inverse functions, L in terms of X and L in terms of Y.
There are an infinite number of inverse functions.

You get two sets of infinite equations, one from X and one from Y.

There can only be one specific value of L which can be the solution to the equations in both infinite sets. And it is the solution to only one equation in each set.

This is way beyond me lol. I just want to know the formula for L in terms of X and Y.
 

1. How does the conversion from 2 COD (x,y) to 1 Hilbert curve COD work?

The conversion from 2 COD (x,y) to 1 Hilbert curve COD involves mapping the x and y coordinates of the 2 COD onto a Hilbert curve, which is a space-filling curve. This is done by breaking down the x and y coordinates into binary numbers and then rearranging them according to the Hilbert curve's algorithm. The resulting rearranged binary numbers are then converted back to decimal numbers, giving the new 1 Hilbert curve COD.

2. What are the benefits of using a Hilbert curve COD over 2 separate CODs?

Using a Hilbert curve COD allows for more efficient storage and retrieval of data. The Hilbert curve is a space-filling curve, meaning it covers every point in a given space without any gaps or overlaps. This allows for a more compact representation of data compared to 2 separate CODs. Additionally, the Hilbert curve preserves locality, meaning data points that are close to each other in the original 2 CODs will also be close to each other in the new 1 Hilbert curve COD.

3. Can any 2 COD (x,y) be converted into a 1 Hilbert curve COD?

Yes, any 2 COD (x,y) can be converted into a 1 Hilbert curve COD using the Hilbert curve algorithm. However, the resulting Hilbert curve COD may not be unique, as different starting points on the Hilbert curve can produce the same coordinates. Therefore, it is important to keep track of the starting point used in the conversion process in order to accurately retrieve the original 2 COD (x,y) coordinates.

4. Is there a limit to the size of the 2 COD (x,y) that can be converted into a Hilbert curve COD?

The size of the 2 COD (x,y) that can be converted into a Hilbert curve COD depends on the precision of the coordinates used. The more decimal places used, the larger the 2 COD can be before it reaches the limit of the Hilbert curve's precision. However, for practical purposes, it is recommended to use coordinates with no more than 10-12 decimal places to avoid any potential loss of precision in the conversion process.

5. Are there any drawbacks to using a Hilbert curve COD?

One potential drawback of using a Hilbert curve COD is the loss of interpretability. The resulting 1 Hilbert curve COD may not be easily understandable or interpretable by humans, as it may not correspond to any recognizable pattern. Additionally, the conversion process can be computationally intensive, especially for large datasets, which may impact the overall efficiency of data storage and retrieval.

Similar threads

Replies
14
Views
1K
  • Quantum Physics
2
Replies
61
Views
1K
Replies
3
Views
333
  • Special and General Relativity
Replies
18
Views
1K
Replies
3
Views
1K
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Mechanical Engineering
Replies
1
Views
1K
Replies
4
Views
2K
Replies
3
Views
1K
Back
Top