Algorithm for generating a 3D Hilbert space-filling curve in Python

后端 未结 3 486
一生所求
一生所求 2020-12-09 17:45

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.

I believe using a 3

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 18:16

    What's frequently used in engineering practice is not strictly Hilbert (Peano) curves - it's Morton code.

    https://en.wikipedia.org/wiki/Z-order_curve

    Much easier to compute.

提交回复
热议问题