Questions tagged [hilbert-curve]

The Hilbert curve is a space-filling curve that preserves locality better than most mappings from one to many dimensions. Originally conceived in two dimensions, it can be generalized to any number of dimensions. Hilbert curves are useful in optimizing database range queries over multiple attributes, such as geospatial queries, and have many other uses.

67 questions
2
votes
1 answer

In the Hilbert Curve, How can I change the library turtle from to matplotlib?

I dont really know how can be solved keeping the recursion, I was studying the turtle library but in the asignature they ask for use matplotlib so I am not really sure about how take it from turtle import Turtle def hilbert_curve(turtle, A,…
2
votes
1 answer

How to sort points along a Hilbert curve without using Hilbert indices?

I'm trying to implement the algorithm described in the paper Fast Hilbert Sort Algorithm Without Using Hilbert Indices…
2
votes
0 answers

How do I get convert an image to compatible hilbert curve data

I just started looking into the hilbert curve algorithm, and I want to convert an image into data that I can use with the algorithms. I dont have any code right now for display, but The code I do have is working and can plot hilbert curves on a…
2
votes
1 answer

Hillbert transform issue in scipy

I am trying to compute the envelope of a signal using the Hilbert transform in Scipy. Here is the code, import numpy as np from scipy.signal import hilbert A=2 lamb=20 w=2*np.pi*100 signal = A**(-lamb*t)*(np.sin(w*t+5)+np.cos(w*t+5)) analytic_signal…
uom0
  • 383
  • 2
  • 12
2
votes
1 answer

Hilbert curve using turtle graphics and recursion

I'm trying to implement an L-System generated Hilbert curve ,making use of python turtle graphics and recursion. My code seems to be working for the first two levels of recursion n=1 and n=2 but beyond that , the graphics just entangled (although…
JFT
  • 23
  • 1
  • 5
2
votes
0 answers

Transform Lebesgue curve to Hilbert curve

I map spatial data onto a one dimensional interval. First I use a space filling Lebesgue curve (or Z curve) in order to connect my points. This works and I get the following plot if I use gnuplot: Then I want to transform the Lebesgue curve to a…
Gilfoyle
  • 3,282
  • 3
  • 47
  • 83
2
votes
1 answer

Is there a constant time algorithm for generating hilbert points curve incrementally?

The Wikipedia Article on the Hilbert Cube includes functions that encode/decode arbitrary indices to/from arbitrary points on the Hilbert Curve. Those algorithms aren't constant-time. Is there a constant-time algorithm that, given an actual point on…
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
2
votes
3 answers

Hilbert-Peano curve to scan image of arbitrary size

I have written an implementation of Hilbert-Peano space filling curve in Python (from a Matlab one) to flatten my 2D image: def hilbert_peano(n): if n<=0: x=0 y=0 else: [x0, y0] = hilbert_peano(n-1) x =…
2
votes
0 answers

Inferring simplest method to convert bit array 1 to bit array 2

Consider the set of all bit arrays of length n. Now consider the set of all 1-to-1 functions that map from this set to this set. Now select a single function out of the latter set. Is there any algorithm to find a "minimal" method of implementing…
JnBrymn
  • 24,245
  • 28
  • 105
  • 147
1
vote
3 answers

Compact Hilbert Code by Chris Hamilton - to calculate Compact Hilbert Indices

I have a multidimensional points which may have keys of the following 3 types INT(4) i.e. Short , or INT(8) or varchar(512). For this reason I can't use normal Hilbert curve transformation. I found a very good resource to calculate compact hilbert…
Basmah
  • 829
  • 3
  • 13
  • 25
1
vote
0 answers

Hilbert transform of sinus func

i am trying to perform hilbert transform of sinus function using this equation in Matlab, but i get confused about k mean. I read it about phase shifting and i try to put 2*pi, but it still does not work in matlab. theta=2*pi; fun=@(t)…
newbie-mat
  • 11
  • 1
1
vote
0 answers

Algorithms to find the edges of concave polygon

In a Javascript-based environment, I am starting with points that define segments of a Hilbert curve, e.g., an order-7 curve, partitioned into 24 arbitrary segments defined over a 128 x 128 2D space: For each segment, given sets of points (x, y)…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
1
vote
1 answer

Mapping points to and from a Hilbert curve

I have been trying to write a function for the Hilbert curve map and inverse map. Fortunately there was another SE post on it, and the accepted answer was highly upvoted, and featured code based on a paper in a peer-reviewed academic…
Taylor
  • 1,797
  • 4
  • 26
  • 51
1
vote
0 answers

Hilbert Transform and the Time-frequency spectrum in MATLAB

I need to understand the difference between the two commands hht and hilbert of Matlab to implement the Hilbert transform. Are the results similar when we have real-valued data? Also for the implementation of time-frequency spectrum of Hilbert's…
Khan
  • 23
  • 1
  • 7
1
vote
1 answer

Dividing Query on Geospatial Index

I'm looking into storing geospatial information using a geohash-like index, perhaps using Hilbert curves. My question is regarding how best to split up area queries on such an index. This article for example shows how one might want to split an area…