1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
dotSCAD/docs/lib3x-nz_perlin1.md

22 lines
458 B
Markdown
Raw Normal View History

2020-04-05 20:12:08 +08:00
# nz_perlin1
Returns the 1D [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise) value at the x coordinate.
**Since:** 2.3
## Parameters
- `x` : The x coordinate.
- `seed` : The random seed.
## Examples
2021-12-04 10:57:29 +08:00
use <polyline_join.scad>;
2020-04-05 20:12:08 +08:00
use <util/rand.scad>;
use <noise/nz_perlin1.scad>;
2022-03-28 15:39:58 +08:00
seed = rand(0, 255);
2021-12-04 10:57:29 +08:00
polyline_join([for(x = [0:.1:10]) [x, nz_perlin1(x, seed)]])
circle(.05);
2020-04-05 20:12:08 +08:00
2021-02-24 21:09:54 +08:00
![nz_perlin1](images/lib3x-nz_perlin1-1.JPG)