Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

ojrac/opensimplex-go

Repository files navigation

ARCHIVED

Two things have happened since this repository was built, that you might care about:

  • The Simplex noise patent has expired
  • There's a new revision of this algorithm, OpenSimplex2

Feel free to use this library, but I don't intend to make any future updates to it. You may need to create a fork if you'd like it to work differently.

OpenSimplex in Go

GoDoc Build Status

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.

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

Tests

This implementation of OpenSimplex's tests verify its output against the output of the reference Java implementation. I haven't run these tests on different architectures, so results may vary.

License

This code is under the same "license" as Kurt's OpenSimplex - the public domain "unlicense."

Next Steps

  • More documentation
  • Benchmarks

About

A port of Kurt Spencer's OpenSimplex to Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages