Some combinatorial applications of spacefilling curves

This squiggly line planned meals, maps, and maybe even laser targets

TLDR: A simple map-tracing trick can create pretty good delivery routes fast, and it has been used for everything from Meals on Wheels to map drawing. Commenters loved the elegance, piled on extra optimization ideas, and absolutely fixated on the surreal jump from charity logistics to possible space-laser targeting.

A decades-old math idea about a single squiggly line that wanders through every part of a map has the comments section acting like it just discovered a secret life hack. The big claim: instead of calculating the absolute best route for every stop, you can follow the order of a so-called space-filling curve and get a route that’s fast to build, easy to update, and good enough for real life. And yes, readers were delighted by the most delightfully low-tech flex in the whole piece: one early system for Meals on Wheels was reportedly built using two Rolodex card files. That detail alone had big “your startup could never” energy.

The strongest reaction was basically: wait, this is actually genius. One commenter marveled that this simple trick gives solid Traveling Salesman routes in reasonable time, while another said they’d only seen these curves used for splitting work in parallel computing, not for route planning. Then the armchair optimizers arrived: one reader immediately suggested remixing the curve by rotating, shifting, or resizing it to generate lots of quick candidate routes, then cleaning up any crossing lines for easy gains. Because of course the comments had to turn into free consulting.

And then came the tonal whiplash. Buried in the original examples was a mention of the Strategic Defense Initiative, better known as the Reagan-era “Star Wars” missile defense plan, and commenters instantly zoomed in on the wild image of a math curve helping choose the order for a space-based laser to hit incoming targets. Another chimed in to remind everyone these curves also quietly power spatial search tools like the Hilbert R-tree. So the vibe was equal parts “neat!”, “this should be everywhere,” and “hold on, why did this escalate from meal delivery to orbital lasers?”

Key Points

  • The article presents a travelling salesman heuristic that orders locations according to their appearance along a spacefilling curve.
  • For random point sets, the heuristic is expected to produce tours about 25% longer than the optimum.
  • The method constructs tours in O(n log n) time, supports O(log n) updates, does not require explicit distance calculations, and is parallelizable.
  • Because link lengths in random-point tours are expected to be small and have low variance, a route can be partitioned into k segments for k vehicles.
  • The heuristic has been applied to Meals-on-Wheels routing, Red Cross blood delivery, Strategic Defense Initiative targeting, pen-plotter map drawing, and commercial GIS and logistics systems.

Hottest takes

"using a Rolodex to plan Meals on Wheels routes" — shraiwi
"randomly translating, rotating and/or uniformly scaling the curve" — akoboldfrying
"selecting an ordering to engage multiple simultaneous targets" — shoo
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.