Spacecurve: A space-filling curve playground

Beautiful math toy drops—Rust heads cheer, gamers squint

TLDR: A new Rust-built tool lets you explore space-filling curves in 2D/3D, even in the browser. The community split: dazzled by the visuals yet debating real-world uses, with one dev warning 3D can confuse players—making this both a math art show and a potential search strategy lab.

The blog resurrection no one expected: after a very delayed New Year’s resolution, the creator dropped Spacecurve, a playground for squiggly lines that fill every nook of a square or cube. Think mesmerizing pixel spirals with names like Hilbert and Peano, now running in Rust and viewable in 2D/3D via a slick web viewer. The dev calmly notes, “Written in Rust… with a web visualiser,” while the crowd does what it does best—debate whether this is art, science, or just another “rewrite it in Rust” meme.

The hottest split? Pretty versus practical. One camp is hypnotized by the visuals; the other argues these curves aren’t just eye candy—they can be efficient paths when moving around a space has a cost. A top commenter asks if smart search strategies can emerge naturally from these patterns, turning a toy into a toolkit. Meanwhile, a veteran game dev drops a cautionary tale: their 3D curve game left testers bewildered. Translation: cool in theory, brain melt in practice. Jokes flew about timelines (“New Year’s resolution, but make it 2026”), and someone dubbed the Hilbert curve the “IKEA map for pixels.” It’s math art meets utility, with the community split between wow and why.

Key Points

  • The author released spacecurve, a Rust library for generating space-filling curves.
  • A companion CLI tool, scurve, offers 2D/3D visualization using egui.
  • The visualizer runs both natively and in the browser via egui’s WebAssembly support.
  • Supported curves include Hilbert, Peano, Sierpinski, Moore, and Z-order.
  • Installation uses Rust’s ecosystem: `cargo add spacecurve` and `cargo install scurve`; launch GUI with `scurve gui`.

Hottest takes

"Written in Rust, with cross-platform + web visualiser in egui" — cortesi
"It also had a 3D mode... most play testers were just confused" — seu
"some patterns can be pretty efficient for search if there is a spatial movement cost" — bArray
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.