A Generator of Multidimensional Noise
Clone or download
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.
R Fix #7 Aug 29, 2018
man
src
.Rbuildignore
.gitattributes
.gitignore
.travis.yml
DESCRIPTION
LICENSE
LICENSE.note
NAMESPACE
README.Rmd
README.md
appveyor.yml

README.md

ambient

Travis-CI Build Status AppVeyor Build Status CRAN_Release_Badge CRAN_Download_Badge

ambient is a an R package that provides access to the FastNoise C++ library for generating noise. As such it provides fast generation of perlin, value, cubic, and worley noise in 2 and 3 dimensions, as well as simplex and white noise in 2, 3, and 4 dimensions.

Most of the noise patterns can be generated as fractals as well with support for fbm, billow and rigid-multifractal, and can optionally be pertubed.

There's not much more to it. If you are in need of a noise generator ambient is your friend, if not you probably shouldn't care.

Installation

For the time being ambient is only available on Github, and can be installed with devtools:

# install.packages('devtools')
devtools::install_github('thomasp85/ambient')

In the future the package will be available on CRAN as well.

Examples

Following is a couple of examples of the noise patterns possible with ambient:

library(ambient)
plot_raster <- function(mat) {
  mat <- (mat - min(mat)) / diff(range(mat))
  plot(as.raster(mat))
}

# Simplex
plot_raster(noise_simplex(c(500, 500)))

# Simplex - No fractality
plot_raster(noise_simplex(c(500, 500), fractal = 'none'))

# Worley (cellular)
plot_raster(noise_worley(c(500, 500)))

# Worley - with pertubation
plot_raster(noise_worley(c(500, 500), pertubation = 'normal', pertubation_amplitude = 40))