1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 04:20:27 +02:00

add pnoise1

This commit is contained in:
Justin Lin
2020-03-05 17:58:54 +08:00
parent 51acd1cb8b
commit ec9fbc6162

View 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)]
];