Socket
Socket
Sign inDemoInstall

github.com/ojrac/opensimplex-go

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/ojrac/opensimplex-go

opensimplex is a Go implementation of Kurt Spencer's patent-free alternative to Perlin and Simplex noise. Given a seed, it generates smoothly-changing deterministic random values in 2, 3 or 4 dimensions. It's commonly used for procedurally generated images, geometry, or other randomly-influenced applications that require a random gradient. For more information on OpenSimplex noise, read more from the creator of the algorithm: http://uniblock.tumblr.com/post/97868843242/noise


Version published

Readme

Source

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

FAQs

Last updated on 27 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc