空间曲线:一个填充曲线的游乐场
Spacecurve: A space-filling curve playground

原始链接: https://corte.si/posts/spacecurve/announce/

在新年决心推迟两年后,作者发布了“spacecurve”,一个基于Rust的新项目,探索空间填充曲线——一项长期存在的数学迷恋。该项目建立在之前的工作之上,例如恶意软件可视化和binvis.io工具。 “spacecurve”既是一个用于生成曲线(希尔伯特曲线、皮亚诺曲线等)的库,也是一个命令行工具“scurve”,提供了一个使用egui构建的视觉探索界面。该界面可以在本地原生运行,也可以在网页浏览器中使用,允许用户与2D和3D曲线进行交互。 重写为Rust提供了快速的基础实现,并为未来在可视化、颜色空间和曲线固有性质方面的探索奠定了基础。该项目可以通过Cargo安装,也可以通过在线查看器访问。

Hacker News新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交登录 Spacecurve: 一个空间填充曲线游乐场 (corte.si) 6点 由 cortesi 1小时前 | 隐藏 | 过去 | 收藏 | 2评论 cortesi 1小时前 [–] 用Rust编写,带有跨平台 + egui网络可视化工具。回复 storystarling 38分钟前 | 父评论 [–] 几年前我用希尔伯特曲线在分布式系统中实现了数据局部性。它非常适合优化多维数据的范围查询。你的实现是否使用SIMD进行位交错?我记得那是我们在实时生成密钥时遇到的主要瓶颈。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

In 2024, I noticed that I'd let my blog languish. Since the issue was urgent, I made a firm new year's resolution to address the situation in 2025. Which is why, today, in January 2026, I'm writing this post.

I've just released spacecurve, a new just-for-fun space-filling curve project. It's is the latest symptom of a long preoccupation with these beautiuful mathematical objects. Over the years, this preoccupation yielded blog posts like malware visualisations, a portrait of the Hilbert curve and tools like binvis.io. I have a long list of related ideas I never got to but have to wanted to explore, and the first step is naturally to... rewrite it in Rust. This is just a starting point, a base for exploring ideas I have about visualisation, color spaces, and the qualities of the curves themselves.

As part of the rewrite we now have fast base implementations of the curves themselves in the spacecurve library, and a visual exploration tool for 2D and 3D curves in the scurve command-line tool. Thanks to egui, the visualiser runs both natively and in the browser.

Click through on the images below to see the web version.

Installation

spacecurve is a Rust library for generating a variety of space-filling curves, including Hilbert, Peano, Sierpinski, Moore, and Z-order curves.

cargo add spacecurve

scurve is a command-line tool for generating and visualizing space-filling curves.

cargo install scurve

It includes an egui interface for exploring the curves in 2D and 3D, which you can run like this:

scurve gui

spacecurve web

Because egui supports webassembly, I've also deployed the egui app to the web. Access it by clicking below, or on any of the images above.

Web Viewer

联系我们 contact @ memedata.com