love.math.simplexNoise
Available since LÖVE 12.0 |
This function replaces love.math.noise. |
Generates a Simplex noise value in 1-4 dimensions. The return value will always be the same, given the same arguments.
It is widely used for procedural content generation.
The return value might be constant if only integer arguments are used. Avoid solely passing in integers, to get varying return values. |
Contents
Function
Generates Simplex noise from 1 dimension.
Synopsis
value = love.math.simplexNoise( x )
Arguments
number x
- The number used to generate the noise value.
Returns
number value
- The noise value in the range of [0, 1].
Function
Generates Simplex noise from 2 dimensions.
Synopsis
value = love.math.simplexNoise( x, y )
Arguments
number x
- The first value of the 2-dimensional vector used to generate the noise value.
number y
- The second value of the 2-dimensional vector used to generate the noise value.
Returns
number value
- The noise value in the range of [0, 1].
Function
Generates Simplex noise from 3 dimensions.
Synopsis
value = love.math.simplexNoise( x, y, z )
Arguments
number x
- The first value of the 3-dimensional vector used to generate the noise value.
number y
- The second value of the 3-dimensional vector used to generate the noise value.
number z
- The third value of the 3-dimensional vector used to generate the noise value.
Returns
number value
- The noise value in the range of [0, 1].
Function
Generates Simplex noise from 4 dimensions.
Synopsis
value = love.math.simplexNoise( x, y, z, w )
Arguments
number x
- The first value of the 4-dimensional vector used to generate the noise value.
number y
- The second value of the 4-dimensional vector used to generate the noise value.
number z
- The third value of the 4-dimensional vector used to generate the noise value.
number w
- The fourth value of the 4-dimensional vector used to generate the noise value.
Returns
number value
- The noise value in the range of [0, 1].
Notes
There are many webpages which discuss Perlin and Simplex noise in detail.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info