How do I create a Hilbert curve that is bounded by a polygon?

219 Views Asked by At

All images of the Hilbert curve that I've seen show the Hilbert curve as bounded by the unit square:

Hilbert curve

However, if I have a list of vertices that define a closed polygon, how can I create a Hilbert curve that is bounded by the edges of this polygon, instead of a square? Is this even possible?

1

There are 1 best solutions below

2
On

If the polygon is star-shaped is easy to find a homeomorphism between it and the square. Compose the curve with this homeomorphism.