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
1
vote
0 answers

Extending the Hilbert Space filling curve to symmetric matrices

I have been reading for some time about L-Systems, and specifically the Hilbert Space filling curve. I am interested in writing a function to convert upper-triangular matrix coordinates into an 1-dimensional space filling curve coordinates. The…
1
vote
1 answer

Is there any existing implementation or logic for Hilbert curve mapping for floating point co-ordinates?

I am working on implementing a Hilbert curve mapping that uses co-ordinates with floating points. I have come across several Hilbert curve implementations at Github and looks like all of them consider integer co-ordinates only. Though I am working…
1
vote
0 answers

Calculating Hilbert Curve by iteration for a Coordinated List (COO) Sparse Matrix

I am working on the PageRank problem and have a Coordinated list (Coo) matrix. The matrix has a source and destination array as seen below. Every source points at the destination at the same position int[] destination = new int[] { 5, 0, 5, 0, 5, 0,…
1
vote
1 answer

matplotlib can't plot colored Hilbert curve?

I'm trying to plot a colored 2D Hilbert curve using matplotlib. After getting the x and y coordinates, a plain ax.plot(x,y) gives the correct curve, but if I want to color-code the curve using the technique introduced in this post, it gives me an…
Jason
  • 2,950
  • 2
  • 30
  • 50
1
vote
1 answer

Transform 3D coordinates to index of a space-filling curve (Peano, Hilbert...)

While transformation of 3D coordinates to a z-order curve was relatively straightforward (Efficient z-order transformation in Fortran) I am having difficulties to wrap my head around around the math for using different space-filling curves, for…
MechEng
  • 360
  • 1
  • 13
1
vote
0 answers

Hilbert Curve: Implementing for N-Dimensions

The Hilbert curve Wikipedia article includes some C code that shows how to map coordinates to the curve but it only works for two-dimensions. I'm having trouble finding any examples that work for N-dimensions (curve examples are plentiful but not…
Dustin Oprea
  • 9,673
  • 13
  • 65
  • 105
1
vote
1 answer

How to translate bitwise functions from matlab/C to R? Particular case: Hilbert curve algorithm

I am trying to translate a script written in matlab to R. The script maps 1D coordinates to 2D coordinates based on the Hilbert curve. There is a line in the script which I am not sure how to translate into R: ry = mod ( bitxor ( uint8 ( t ), uint8…
ben
  • 787
  • 3
  • 16
  • 32
1
vote
1 answer

HilbertMaze task on Codility

Can anybody give me a hint about how to approach following task from Codility: https://codility.com/programmers/task/hilbert_maze/ I would be able to find the shortest path by generating the maze and searching for the shortest path using BFS, but…
Marko Previsic
  • 1,820
  • 16
  • 30
1
vote
2 answers

python print syntax error

I am experimenting with Hilbert curves written in Python in an Xcode IDE. The code listing is: # python code to run the hilbert curve pattern # from http://www.fundza.com/algorithmic/space_filling/hilbert/basics/index.html import sys, math def…
1
vote
0 answers

Envelope of signal + how to generate nice smooth 2d lines animation

I'm trying to set the envelope of a signal with the function obspy.signal.filter.envelope. So far, my program is generating 2 lines: the red one is the raw signal. The blue one is the signal filtered with a bandpass filter (filter_sinc…
GeoffreyB
  • 536
  • 1
  • 7
  • 17
1
vote
0 answers

2D Space filling curves with Bit Twiddlings 64bits

Are there any space filling curves that can be calculated(indexes) with Bit Twiddling , different from neutral(simple shift), Morton(Binary Magic Numbers), and Hilbert(from Morton) ? Any examples with encode(xy2d)/decode(d2xy) ?
Dawid Szymański
  • 775
  • 6
  • 15
1
vote
3 answers

Hilbert–Huang transform: Instantaneous frequency

I'm implementing the "Empirical Mode Decomposition" in Java. The next step is Hilbert–Huang transform and I need to find how to get the "Instantaneous frequency". Does someone Know how to get it? Using the EMD method, any complicated data set can…
user3582433
  • 469
  • 1
  • 8
  • 24
1
vote
2 answers

Finding the optimal depth/ranges in a set of quad trees to optimize retrieval of points in bounding box

If I have a set of quad tree (say on a Hilbert curve) what would be a good way to approach finding the optimum (or good enough) set of ranges at particular depth. For example, if I'm searching for points between the bounding box 0,0 and 1,3 then I…
sh1mmer
  • 1,316
  • 11
  • 19
1
vote
1 answer

How do I perform a rotation on the Hilbert Curve Space about a primary axis

So here is the issue I have taken the Doug Moore code from http://www.tiac.net/~sw/2008/10/Hilbert/moore/hilbert.c and converted it into java for use in my masters thesis on implementing an LSH method for storing photons in a Photon Mapped Ray…
John
  • 11
  • 5
1
vote
2 answers

Speeding up global illumination using space filling curves - How does it works?

Just for learning purposes, I was looking at raytracing techniques. I recently discovered Global Illumation and its variants, reading at this amazing work by Kevin Beason. I did tried to port smallpt in another language (Lua). I got something…
Roland Y.
  • 423
  • 6
  • 13