在Python中生成3D希尔伯特空间填充曲线的算法 [英] Algorithm for generating a 3D Hilbert space-filling curve in Python
问题描述
我想将RGB颜色立方体中的点映射到Python中的一维列表,以使颜色列表看起来美观且连续。
I'd like to map points in a RGB color cube to a one-dimensional list in Python, in a way that makes the list of colors look nice and continuous.
我相信使用3D希尔伯特空间填充曲线将是实现此目的的一种好方法,但是我进行了搜索,但没有找到非常有用的资源来解决此问题。尤其是Wikipedia仅提供了用于生成2D曲线的示例代码。
I believe using a 3D Hilbert space-filling curve would be a good way to do this, but I've searched and haven't found very helpful resources for this problem. Wikipedia in particular only provides example code for generating 2D curves.
推荐答案
本文似乎有很多讨论:
三维希尔伯特空间填充曲线的清单。
This paper seems to have quite a discussion: An inventory of three-dimensional Hilbert space-filling curves.
引用摘要:
希尔伯特的二维空间填充曲线因其
的良好局部性而受到赞赏适用于许多应用。但是,尚不清楚
概括此曲线以填充
高维空间的最佳方法是什么。我们认为使
希尔伯特曲线在两个维度上独一无二的属性由10694807
在三个维度上结构不同的空间填充曲线所共享。
Hilbert's two-dimensional space-filling curve is appreciated for its good locality properties for many applications. However, it is not clear what is the best way to generalize this curve to filling higher-dimensional spaces. We argue that the properties that make Hilbert's curve unique in two dimensions, are shared by 10694807 structurally different space-filling curves in three dimensions.
这篇关于在Python中生成3D希尔伯特空间填充曲线的算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!