Talk:Hilbert curve

message: It seems doubtful to me whether the Hausdorff dimension of a space-filling curve is help- or meaningful in any sense. Shall we remove it? (Same situation with Sierpiński curve) — Nol Aders 16:02, 4 January 2006 (UTC)
replies: text: I agree. And the recently added discussion of Fractal dimension makes the problem glaringly obvious. If we interpret “the curve” as being the image of the curve in the plane, then we are simply left with the unit square, which is two-dimensional by any reasonable definition. The parenthetical remark (in the limit n \rightarrow \infty) just adds an air of mystery. If we interpret “the curve” as the graph of the parametrized curve in three-dimensional space, then I am not really sure how to compute the fractal dimension, but I strongly suspect the answer is still 2. The remark on the fractal dimension being 1 seems nonsensical to me, since the four quarters of the curve are scaled-down versions of the full curve by a factor of 2, not 4 (it is the linear scaling factor that is relevant, not the area scaling factor). Hence the answer should again be 2. Hanche (talk) 17:19, 7 May 2009 (UTC)
replies: text:  Basic error about the factor. I undid revisions.Prokofiev2 (talk) 09:01, 10 May 2009 (UTC)

text:  by the way, concerning the "meaning" of the Hausdorff dimension of a space-filling curve (Aders' remark): Yes, it is meaningful. The Hausdorff dimension is even meaningful for non-fractal objects, like a square, or a straight line. The Hausdorff measure is nothing more than the natural extension of euclidian measures (length, area, volume...). Prokofiev2 (talk) 09:31, 10 May 2009 (UTC)
replies: text:  Yes, of course it is meaningful. But is it meaningful in a non-trivial and/or interesting way? I think not, hence I think it should be removed. Hanche (talk) 15:01, 11 May 2009 (UTC)
replies: text:  We agree on the fact it is trivial. But they have their place on a list of fractals, could we discard important examples of curves because their dimension is "too simple" ?Prokofiev2 (talk) 21:59, 11 May 2009 (UTC)
replies: text:  Um, I never thought of discarding the curve (meaning the whole article, I presume). And the issue is not the simplicity of the dimension, it is the triviality of the reason for the dimension being what it is. The Sierpinski tetrahedron, for example (a misnomer but easily understandable) had fractal dimension 2, but that is still interesting. The image of the Hilbert curve, OTOH, is just a square, which is utterly boring. Hanche (talk) 16:04, 12 May 2009 (UTC)
replies: text:  I think the discussion of the Hausdorff dimension is useful here. Anyone who is interested in this curve and unaware of Hausdorff dimension would be well-served by the reference to it, and anyone who is already aware of it will be well-served to know in which sense of dimension the dimension is two. (I'm aware that under any reasonable definition, the dimension will be two, but I think it aids the reader to have a particular definition given, so they can verify it.) On the other hand, I think the phrase "in the limit n \rightarrow \infty" is confusing. The Hilbert curve is a particular curve, so there is no parameter to adjust, even if in one particular construction it is convenient to think of the curve as a limit of piecewise linear curves. I would have removed this phrase myself, if it wasn't already under discussion. Otherwise, a very nice article. 129.215.255.13 (talk) 20:34, 22 May 2009 (UTC)
replies: text:  There seems to be a consensus among everybody but me to keep the Hausdorff dimension comment. So I'll leave it alone; but I have removed the limit part of the sentence. Hanche (talk) 06:43, 26 May 2009 (UTC)
replies: text: In fact, I agree with you. It seems to me that the Hausdorff dimension comment is not really relevant here; but if we want to keep it, then we have to make it clear whether we refer to the image or to the graph of H(t), otherwise it sounds mysterious or misleading (the Hausdorff measure and dimension are attached to a metric space, not to a function). I confirm that the 2-dimensional measure of the graph is still 1, as can be directly checked from the definition of Hausdorff measure. I've added a parenthesis, but I'm still not convinced of the relevance of it. --pma (talk)  16:53, 24 December 2009 (UTC)
thread_title:  [[Hausdorff dimension]] 

message: Someone had added a link to Hilbert II curve under See Also. The article does not exist, and I certainly have no idea what it should cover.  So I undid the edit. If the guy who did it does know, I think he should create the article first, then link to it. Does anyone else have an inkling as to what the Hilbert II curve might be? Hanche 17:59, 12 November 2007 (UTC)
replies: text: Hilbert II is a similar curve that winds from one corner of a square to the opposite corner (as opposed to Hilbert I, which winds from one corner to an adjacent corner); Peitgens-Jürgens-Saupe (1992, pp. 390-1) also call it "S-shaped Peano Curve"; has L-system defns {X -> XFYFX+F+YFXFY-F-XFYFX, Y -> YFXFY-F-XFYFX+F+YFXFY}... Robertd (talk) 15:32, 10 May 2008 (UTC)

text: A sideways version of this, in fact:  Robertd (talk) 15:39, 10 May 2008 (UTC)
replies: text:  Okay, then. This curve is in fact the original Peano curve, as described by Peano himself in 1890 (though his description is more complicated, being based on the manipulation of digits in the base 3 representation of numbers in [0,1]). Of course, the waters have been muddied somewhat by the Hilbert curve being called the Peano curve in the literature. I wonder, what is the basis for attaching Hilbert's name to the Peano, or “Hilbert II” curve? Hanche (talk) 08:56, 11 May 2008 (UTC)
replies: text: Well, of course there is no basis. In fact, space filling curves are generally named "Peano curves". Notice that in his paper of 1890 on Math. Annalen, Peano also gives a short hint to make variations (including the successive Hilbert variant of his construction); but his aim was not to make a general theory, but rather, to exhibit a continuous curve filling the square, and describing it via digit expansion, rather than via geometrical constructions. The reason to avoid any appeal to visual intuition was not due to sadism towards the readers, but because the subject was a delicate matter about foundations of topology and geometry, in which the maximum rigour was needed. He choose the ternary option and not the binary because, indeed the digit description turns out to be simpler for odd basis. He made a picture of the curve in a tail tassellation in his bathroom, however. --pma (talk)  09:42, 23 December 2009 (UTC)

text:  There isn't a strong consensus on how to display code in a language-agnostic way for Wikipedia.  It's discussed here, but conclusions were generally down to preference.  In academia, a standardized psuedocode like in Burrows-Wheeler Transform#Example often is used.  As a reference, here is a  pseudo code standard that explains how to make pseudo code in a very regimented way.Fletcher Porter (talk) 19:37, 23 February 2016 (UTC)
thread_title:  Hilbert II curve? 

message: This might be trivial but informational. IPV4 Heatmap program uses Hilbert curve to map the Internet address space. --Oblivious (talk) 17:37, 17 March 2008 (UTC)
replies: text: Oh, and that's actually based on xkcd's casual attempt. May be grounds for an "In Popular Culture". 65.96.201.130 (talk) 13:29, 18 October 2008 (UTC)
thread_title: Informational

message: I came to this article to satisfy my curiosity on a basic fact, but the article doesn't address this key question. Which is: Does the Hilbert curve hit every point in the unit square? Or does it merely come arbitrarily close to every point? 
That would help the visualization and understanding immensely. 
76.102.69.21 (talk) 23:29, 6 May 2012 (UTC)
replies: text: It hits every point, as it must by a compactness argument. The image of the curve is a compact subset of the unit square; in particular it is closed. So any point that is arbitrarily close to the curve is on the curve. And in fact, the second paragraph (the one mentioning the Hausdorff dimension) does say the image is the entire square. Hanche (talk) 13:20, 7 May 2012 (UTC)
replies: text:  But only for an infinite number of recursions. Otherwise you can never get any irrationals at all. And any one iteration will miss most of the rationals to boot. Remember the strange nature of infinity, you can never get there. 204.191.89.147 (talk) 09:17, 15 December 2012 (UTC)
replies: text: The Hilbert curve IS the limit of those constructions, not any one of the discrete approximations.  — Preceding unsigned comment added by 2003:69:CD0B:C001:2E81:58FF:FEFF:8F4B (talk) 09:00, 26 October 2013 (UTC)
thread_title:  Hits every point or just close to every point? 

message: If you look at the floorplan of an Ikea store, they very often use a Hilbert curve as the route you have to follow to get from entrance to exit.  The logic behind this is obvious from the space-filling nature of the curve...but leads me to remark to my wife that it also maximizes the distance you have to walk to find what you need.
Anyway...if a reference could be found, thus would be a great addition to the Applications section of this page.
SteveBaker (talk) 00:40, 13 August 2015 (UTC)
thread_title:  Ikea 

message: I reverted the image added by , mainly because it didn't actually appear to be a Hilbert curve (or a step in the construction, of course).  If there is some connection I'm not seeing, it should probably be explained in the caption – more than just a link to another article that doesn't seem relevant.  If it does get re-added, it should also be along with the rest of the gallery, and not on its own on the right.  –Deacon Vorbis (carbon • videos) 18:47, 7 February 2018 (UTC)
thread_title:  recent image addition 

message: The introduction to the code sequence currently says:
"It assumes a square divided into n by n cells, for n a power of 2, with integer coordinates, with (0,0) in the lower left corner, (n − 1, n − 1) in the upper right corner, and a distance d that starts at 0 in the lower left corner and goes to {\displaystyle n^{2}-1} n^2-1 in the lower-right corner. This is different from the animation shown above where the curve starts from upper left corner and terminates at upper right corner."
I don't see anything in the code which defines whether it's using lower-left or top-left origin convention, and there are absolutely graphics APIs that use both - so I don't see why calling this out as "different from the animation" is necessary. Could we not just say something like:
"It assumes a square divided into n by n cells, for n a power of 2, with integer coordinates, and a distance d that starts at 0 at cell coordinate (0,0) and goes to {\displaystyle n^{2}-1} n^2-1 at cell coordinate (n - 1, 0)."
..? (Asking in case I'm missing something, rather than autocratically making an edit. Does Wikipedia have a house style for y direction?) Fluppeteer (talk) 11:49, 11 March 2019 (UTC)
thread_title:  Bottom/top-left convention 

message: The curve may be represented with emoji:
1:
⬆️⬆️
➡️⬅️
2:
⬆️⬆️⬆️⬆️
➡️⬅️➡️⬅️
⬇️➡️⬅️⬇️
⬆️➡️⬅️⬆️
3:
⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️
➡️⬅️➡️⬅️➡️⬅️➡️⬅️
⬇️➡️⬅️⬇️⬇️➡️⬅️⬇️
⬆️➡️⬅️⬆️⬆️➡️⬅️⬆️
➡️⬅️⬇️➡️⬅️⬇️➡️⬅️
⬇️⬇️⬆️➡️⬅️⬆️⬇️⬇️
⬆️⬆️⬇️➡️⬅️⬇️⬆️⬆️
➡️⬅️⬆️➡️⬅️⬆️➡️⬅️
I made some code to write this for arbitrary sizes, and documented the creation process of the code here. This may be of some use for people writing about the curve here or elsewhere, although by itself it is not a Wikipedia-notable fact. Thiagovscoelho (talk) 02:39, 14 July 2023 (UTC)
thread_title:  Possibly useful but likely useless fact 

message: I think the example code in C should be replaced with more descriptive pseudocode, or at least something with comments and descriptive variable and function names. I might try to tackle that, but first I have to decode the C code. 🧐 Marcus erronius (talk) 22:50, 8 September 2023 (UTC)
replies: text: I do see from above that this was a discussed topic, so I would be posting to talk to request dissenting opinions.Marcus erronius (talk) 23:01, 8 September 2023 (UTC)
replies: text: While I agree that Wikipedia shouldn't be a programming manual, a task relevant to the subject of the Hilbert curve is converting from spatial dimensions to an index. The source code that was provided and, as of this writing, is no longer present, was useful and enlightening. I think pseudo-code for such a task would be optimal but, in lieu of that, source code in a common language, like C, JS or Python is adding more than it's detracting. Also, mathematical notation is freely used without being accused of being a "math textbook". Source code is, in some cases, a compact representation of an idea. Just as people can ignore the "mathmatiquese", so can they ignore source code that's not relevant to them. Abetusk (talk) 00:24, 6 February 2024 (UTC)
thread_title:  Code