Package import | "zappem.net/pub/math/hilbert" |
---|---|
Documentation | https://pkg.go.dev/zappem.net/pub/math/hilbert |
Sources | https://github.com/tinkerator/hilbert |
This package provides a one method package to help render Hilbert curves.
Automated documentation for this Go package is available from
.
While the hilbert
package has no dependencies beyond the standard Go
packages, we include an example binary, example/curve.go
, that
serves as a demonstration of using the package and includes the
generation of a png file with a rendered Hilbert curve. This example
uses the draw2d
package to render the curve.
To try this example:
$ go mod tidy
$ go build example/curve.go
$ ./curve --write=example.png
The generated PNG looks like this:
Supplying different --n
values to the curve
program will generate
different scales of the space filling curve.
The hilbert
package is distributed with the same BSD 3-clause license
as that used by golang itself.
Use the github hilbert
bug
tracker.