crystal-open-simplex-noise v1.0.1

2D, 3D, and 4D open simplex noise in crystal.

NOTE: Unmaintained

See this fork for a maintained version: https://github.com/j8r/crystal-open-simplex-noise

Open Simplex Noise

Build Status

This is an implementation of 2D, 3D, and 4D open simplex noise in crystal.

Installation

Add this to your application's shard.yml:

dependencies:
  open-simplex-noise:
    github: doughsay/crystal-open-simplex-noise
    version: "~> 1.0"
  ...

Usage

require "open-simplex-noise"

Instantiate a noise generator using an Int64 seed:

noise = OpenSimplexNoise.new(12345_i64)

Use the generate method, passing in either 2, 3, or 4 Float64s to generate noise:

noise.generate(1.0, 2.0)
#=> -0.08284024020120388

Examples

2D Noise:

2d-noise

3D Noise (2D slice):

3d-noise

4D Noise (2D slice):

3d-noise

Contributing

  1. Fork it ( https://github.com/doughsay/open-simplex-noise/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • doughsay Chris Dosé - creator, maintainer

Credits

This is mostly just a transliteration of the python version from here: https://github.com/lmas/opensimplex, which itself is a transliteration of Kurt Spencer's original code (released to the public domain).

License

MIT

Repository

crystal-open-simplex-noise

Owner
Statistic
  • 3
  • 2
  • 0
  • 0
  • 1
  • over 4 years ago
  • July 28, 2017
License

MIT License

Links
Synced at

Sun, 24 Nov 2024 20:39:39 GMT

Languages