Difference between revisions of "PerlinNoise"

From Minetest Developer Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
Note that [[PerlinNoiseMap]] works faster.
 
Note that [[PerlinNoiseMap]] works faster.
 
<br/>
 
<br/>
 +
 
== Methods ==
 
== Methods ==
 
* <source enclose="none">get2d(pos)</source> — 2d noise value at <source enclose="none">pos={x=,y=}</source>
 
* <source enclose="none">get2d(pos)</source> — 2d noise value at <source enclose="none">pos={x=,y=}</source>
 
* <source enclose="none">get3d(pos)</source> — 3d noise value at <source enclose="none">pos={x=,y=,z=}</source>
 
* <source enclose="none">get3d(pos)</source> — 3d noise value at <source enclose="none">pos={x=,y=,z=}</source>
 
<br/>
 
<br/>
 +
 
== Examples ==
 
== Examples ==
 
See [[VoxelManip#Example|VoxelManip example]]
 
See [[VoxelManip#Example|VoxelManip example]]
 
<br/>
 
<br/>
 +
 
== See also ==
 
== See also ==
 
* [[PerlinNoiseMap]]
 
* [[PerlinNoiseMap]]
 
* [[:Category:Mapgen]]
 
* [[:Category:Mapgen]]
 
<br/>
 
<br/>
 +
 
== External Links ==
 
== External Links ==
 
* [https://forum.minetest.net/viewtopic.php?f=6&t=8157 Minetest forum thread: "minetest.get_perlin() and minetest.get_perlin_map() Return nil"]
 
* [https://forum.minetest.net/viewtopic.php?f=6&t=8157 Minetest forum thread: "minetest.get_perlin() and minetest.get_perlin_map() Return nil"]

Revision as of 06:26, 14 May 2016

A perlin noise generator. Can be created either via PerlinNoise(seed, octaves, persistence, scale) or minetest.get_perlin(seeddiff, octaves, persistence, scale). Note that PerlinNoiseMap works faster.

Methods

  • get2d(pos) — 2d noise value at pos={x=,y=}
  • get3d(pos) — 3d noise value at pos={x=,y=,z=}


Examples

See VoxelManip example

See also


External Links