1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-01 18:54:39 +02:00
This commit is contained in:
Justin Lin
2020-03-29 17:18:24 +08:00
parent dcc8755eea
commit 7efc8985d4

View File

@@ -1,20 +1,6 @@
use <experimental/_impl/_nz_worley_comm.scad>;
use <experimental/_impl/_nz_worley2_impl.scad>;
use <util/sort.scad>;
function _neighbors(fcord, seed, dim, m, n) = [
for(y = [-1:1])
for(x = [-1:1])
let(
nx = fcord[0] + x,
ny = fcord[1] + y,
sd_base = nx + ny * dim,
sd1 = _lookup_noise_table(seed + sd_base),
sd2 = _lookup_noise_table(sd1 * 255 + sd_base),
nbr = [(nx + sd1) * m, (ny + sd2) * n]
)
nbr
];
function _nz_voronoi2(p, seed, dim, m, n) =
let(
fcord = [floor(p[0] / m), floor(p[1] / n)],