mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 04:20:27 +02:00
add pnoise1
This commit is contained in:
11
src/experimental/pnoise1.scad
Normal file
11
src/experimental/pnoise1.scad
Normal file
@@ -0,0 +1,11 @@
|
||||
use <experimental/_impl/_pnoise1.scad> ;
|
||||
|
||||
function pnoise1(from, to, step = 0.5) =
|
||||
let(
|
||||
n = to - from + 1,
|
||||
slopes = rands(-1, 1, n)
|
||||
)
|
||||
[
|
||||
for(x = [0:step:n - 1])
|
||||
[from + x, _pnoise1(x, n, slopes)]
|
||||
];
|
Reference in New Issue
Block a user