mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-01 18:54:39 +02:00
refactor
This commit is contained in:
@@ -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)],
|
||||
|
Reference in New Issue
Block a user