OpenSimplex noise is a random noise algorithm by Kurt Spencer, made as a patent-free alternative to Perlin and Simplex noise. This Go port is based on Kurt's Java implementation.
This package started as a fork fromojrac/opensimplex-go and then simplified to match my needs.
Getting the package is simple, check that you have Go installed (
Simply run the following command:
go get github.com/thee-engineer/ospxn
Why not Perlin noise?
As Kurt explains in his post, Perlin noise tends to generate noise with noticeable axis-aligned artifacts. Simplex noise fixes these artifacts, but it's patented. OpenSimplex noise is for people who don't want to deal with Simplex's patent.
The difference between Perlin and OpenSimplex noise is easiest to see in pictures. This is Perlin noise, with a noticeable bias towards vertical and horizontal artifacts:
Here's what OpenSimplex noise looks like: