Skip to content
A port of Kurt Spencer's OpenSimplex to Go
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead, 2 commits behind ojrac:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
go.mod
ospxn.go
ospxn_base.go
ospxn_doc.go
ospxn_norm.go
ospxn_test.go
ospxn_util.go

README.md

OpenSimplex Noise

GoDoc Go Report Card Build Status

Description

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.

For an introduction to OpenSimplex noise, see Kurt Spencer's post announcing it. If you're not familiar with random noise, the Wikipedia post on Perlin noise is a good introduction.

This package started as a fork fromojrac/opensimplex-go and then simplified to match my needs.

Install

Getting the package is simple, check that you have Go installed (go version).

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:

Perlin Noise sample

Here's what OpenSimplex noise looks like:

OpenSimplex Noise sample

You can’t perform that action at this time.