Curve Filling a Rectangle
Moderators: gmalivuk, Moderators General, Prelates

 Posts: 1047
 Joined: Fri Feb 07, 2014 3:15 pm UTC
Curve Filling a Rectangle
The Hilbert curve completely fills a square. Can a modified version be used to fill a rectangle? My instinct says yes, but I wanted to check anyway.
"You are not running off with CowSkull Man Dracula Skeletor!"
Socrates
Socrates
 doogly
 Dr. The Juggernaut of Touching Himself
 Posts: 5538
 Joined: Mon Oct 23, 2006 2:31 am UTC
 Location: Lexington, MA
 Contact:
Re: Curve Filling a Rectangle
Sure, the Hilbert curve is defined with an x(s) and y(s), and if you take two bump functions and feed those in, you can get what you want.
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.
Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.
Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?
 Soupspoon
 You have done something you shouldn't. Or are about to.
 Posts: 4060
 Joined: Thu Jan 28, 2016 7:00 pm UTC
 Location: 531
Re: Curve Filling a Rectangle
Given the lines are either horizontal or vertical, and you steadily fill the gaps between horizontals by vertical fractures and the gaps between the verticals by horizontal fractures, I'd say that taking a nonunitXunit ratio box and progressively filling it with similarly ratioed higherorder curves (applied as a transform in the same orientation as the box, i.e. complimentary ratios as you recurve around the corner of the bigger curve before it) would hit total horizontal filling by infinite widthless vertical linesegments at the same time as vertical filling by the similar stack of horizontal ones.
Or, by another way of looking at it, if ∞ = 4∞ (which it does, arguably, from various standard usages of alephnull) then ∞*(1/2)=∞*(2/1), so a 1:2 rectangle gets filled just as much at the absolute limit of spacefilling in both axes.
But I can also imagine counterinterpretations. Hilbert curves might not work, but Peany ones would?
PTW, then.
(Ninja says it more succinctly than me.)
Or, by another way of looking at it, if ∞ = 4∞ (which it does, arguably, from various standard usages of alephnull) then ∞*(1/2)=∞*(2/1), so a 1:2 rectangle gets filled just as much at the absolute limit of spacefilling in both axes.
But I can also imagine counterinterpretations. Hilbert curves might not work, but Peany ones would?
PTW, then.
(Ninja says it more succinctly than me.)
Re: Curve Filling a Rectangle
The square and the rectangle are homeomorphic.
Take the obvious homeomorphism between the square and the rectangle. Compose this with the curve. The result should be a curve that fills the rectangle.
Right?
Take the obvious homeomorphism between the square and the rectangle. Compose this with the curve. The result should be a curve that fills the rectangle.
Right?
I found my old forum signature to be awkward, so I'm changing it to this until I pick a better one.
 Eebster the Great
 Posts: 3488
 Joined: Mon Nov 10, 2008 12:58 am UTC
 Location: Cleveland, Ohio
Re: Curve Filling a Rectangle
Couldn't you just substitute, say, x/2 for x? I'm missing the reason why you have to actually do anything at all.
 Xanthir
 My HERO!!!
 Posts: 5426
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: Curve Filling a Rectangle
aka what madako said, yeah. It's a trivial mapping.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 MartianInvader
 Posts: 809
 Joined: Sat Oct 27, 2007 5:51 pm UTC
Re: Curve Filling a Rectangle
Just wanted to add, the beauty of a spacefilling curve is that it's purely topological  which means you can compose it with any continuous function (well, any surjective continuous function) and you still have a spacefilling curve.
So you can start with the Hilbert curve and "stretch" it to fill a rectangle, a triangle, a circle, a star, or pretty much any other connected 2d region.
So you can start with the Hilbert curve and "stretch" it to fill a rectangle, a triangle, a circle, a star, or pretty much any other connected 2d region.
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!

 Posts: 1047
 Joined: Fri Feb 07, 2014 3:15 pm UTC
Re: Curve Filling a Rectangle
I did not know that. Thanks for the information.
"You are not running off with CowSkull Man Dracula Skeletor!"
Socrates
Socrates
 Eebster the Great
 Posts: 3488
 Joined: Mon Nov 10, 2008 12:58 am UTC
 Location: Cleveland, Ohio
Re: Curve Filling a Rectangle
By "surjective continuous function," do you mean in one variable (i.e. ℝ→ℝ or [0,1]→ℝ)? If you mean ℝ→ℝ^{2}, then by surjectivity you already have a spacefilling curve.
 Xanthir
 My HERO!!!
 Posts: 5426
 Joined: Tue Feb 20, 2007 12:49 am UTC
 Location: The Googleplex
 Contact:
Re: Curve Filling a Rectangle
Presumably ℝ²→ℝ²; that's the only thing that typechecks when composed with the spacefilling curve, which maps [0,1]→ℝ²
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
 Eebster the Great
 Posts: 3488
 Joined: Mon Nov 10, 2008 12:58 am UTC
 Location: Cleveland, Ohio
Re: Curve Filling a Rectangle
Yeah it wasn't clear to me in which order he was composing the functions, but in this case, again, that's just what surjective means.
 MartianInvader
 Posts: 809
 Joined: Sat Oct 27, 2007 5:51 pm UTC
Re: Curve Filling a Rectangle
Eebster the Great wrote:Yeah it wasn't clear to me in which order he was composing the functions, but in this case, again, that's just what surjective means.
I meant from the square to a region of R^{2}. And being surjective isn't enough, as I said it also needs to be continuous. Otherwise, you don't have a spacefilling curve, just a spacefilling... function, I guess.
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!
 Eebster the Great
 Posts: 3488
 Joined: Mon Nov 10, 2008 12:58 am UTC
 Location: Cleveland, Ohio
Re: Curve Filling a Rectangle
Fair enough. Essentially, you can transform any curve filling any (simplyconnected open) subset of R^{2} to one filling any other by just composing it with any continuous function from the one onto the other. That such a function always exists follows from the Riemann Mapping Theorem, and for most practical subsets, it's really easy to find such a continuous function.
 MartianInvader
 Posts: 809
 Joined: Sat Oct 27, 2007 5:51 pm UTC
Re: Curve Filling a Rectangle
You can even do a little better than what the Riemann mapping theorem gets you, since you only need a surjective mapping and not a fullon homeomorphism. You can wrap the square around a donut shape (annulus), for example (you don't need simple connectedness, just path connectedness I believe).
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!
 Eebster the Great
 Posts: 3488
 Joined: Mon Nov 10, 2008 12:58 am UTC
 Location: Cleveland, Ohio
Re: Curve Filling a Rectangle
Right, the Riemann Mapping Theorem actually gives you a biholomorphic function. Are biholomorphic functions the isomorphisms of complex analysis?
What is a sufficient condition for the existence of a continuous surjection that is stricter than the hypothesis of the Riemann Mapping Theorem?
What is a sufficient condition for the existence of a continuous surjection that is stricter than the hypothesis of the Riemann Mapping Theorem?
 MartianInvader
 Posts: 809
 Joined: Sat Oct 27, 2007 5:51 pm UTC
Re: Curve Filling a Rectangle
Eebster the Great wrote:What is a sufficient condition for the existence of a continuous surjection that is stricter than the hypothesis of the Riemann Mapping Theorem?
We're being a little fast and loose with our conditions anyway, since the Riemann Mapping theorem is about open sets, but anything covered by a path is going to be compact (and therefore closed). Anyways, I'm pretty sure that any compact pathconnected set can be surjected onto by the square, although the only way I can think to prove it is to essetially construct a spacefilling curve directly.
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!
 Soupspoon
 You have done something you shouldn't. Or are about to.
 Posts: 4060
 Joined: Thu Jan 28, 2016 7:00 pm UTC
 Location: 531
Re: Curve Filling a Rectangle
Have you tried logarithms?
 MartianInvader
 Posts: 809
 Joined: Sat Oct 27, 2007 5:51 pm UTC
Re: Curve Filling a Rectangle
Oh my goodness, of course! Logarithms! I don't know why I didn't see it before! Soupspoon, you're brilliant! And definitely someone who knows what they're talking about and not at all faking it.
I'm going to have to move you way up in the rankings in my latest project  ranking people from best to worst.
I'm going to have to move you way up in the rankings in my latest project  ranking people from best to worst.
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!
 Soupspoon
 You have done something you shouldn't. Or are about to.
 Posts: 4060
 Joined: Thu Jan 28, 2016 7:00 pm UTC
 Location: 531
Re: Curve Filling a Rectangle
Qapla'!
(vo' SuwomIy maDyar pagh vIpawtaH)
(vo' SuwomIy maDyar pagh vIpawtaH)
Re: Curve Filling a Rectangle
Soupspoon wrote:Qapla'!
Please hold your Qapla's until after the lecture.
There is no emotion more useless in life than hate.
Re: Curve Filling a Rectangle
gd1 wrote:Soupspoon wrote:Qapla'!
Please hold your Qapla's until after the lecture.
That's how I got kicked out of the last lecture though
Re: Curve Filling a Rectangle
Soupspoon wrote:Have you tried logarithms?
To be fair, taking the log of one of the variables would indeed map a square onto a rectangle.
Who is online
Users browsing this forum: No registered users and 14 guests