Skip to contents

Three dimensional Hilbert curve

Usage

hilbert_3d(level = 2L)

Arguments

level

The level of the curve.

Value

A three-column matrix of coordinates of points on the 3D Hilbert curve.

Details

There are many forms of 3D Hilbert curve. Here we only implement one specific form.

See also

Michael Bader. Space-Filling Curves: An Introduction with Applications in Scientific Computing, Springer Science & Business Media, 2012. doi:10.1007/978-3-642-31046-1 .

Examples

pos = hilbert_3d(2)
if(require(rgl) && interactive()) {
    plot3d(pos, type = "l", lwd = 4, col = 2)
}
#> Loading required package: rgl