Skip to content

Ken Perlin's improved Perlin noise algorithm in Elixir

License

Notifications You must be signed in to change notification settings

elliotekj/perlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perlin

Hex.pm Version Hex Docs Hex.pm License

An implementation of Ken Perlin's improved Perlin noise algorithm in Elixir.

This library provides functions to generate 3D Perlin noise, which can be used for procedural generation of textures, terrains, and other natural-looking patterns. It includes both single-octave noise generation and multi-octave noise for more complex and detailed results.

The implementation is based on Ken Perlin's improved noise function from 2002, which addressed some of the visual artifacts present in his original 1985 algorithm.

Features

  • ๐ŸŒ 3D noise generation
  • ๐Ÿ” Optional repetition of noise pattern
  • ๐Ÿ”๏ธ Multi-octave noise for more natural-looking results
  • ๐ŸŽ›๏ธ Configurable persistence for octave-based noise

Installation

The package can be installed by adding perlin to your list of dependencies in mix.exs:

def deps do
  [
    {:perlin, "~> 0.1.0"}
  ]
end

Usage

Generate noise

iex> Perlin.noise(3.14, 42.0, 7.0)
0.5684599793920001

Generate multi-octave noise

iex> Perlin.octave(3.14, 42.0, 7.0, 4, 0.5)
0.5530014285141335

License

Perlin is released under the Apache License 2.0.

About

This package was written by Elliot Jackson.

About

Ken Perlin's improved Perlin noise algorithm in Elixir

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages