From f41f33597fba566a9f8cd25d97152779af6cb174 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 9 Mar 2020 08:43:55 +0800 Subject: [PATCH] use new pnoise2 --- src/experimental/_impl/_pnoise_contour_impl.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/experimental/_impl/_pnoise_contour_impl.scad b/src/experimental/_impl/_pnoise_contour_impl.scad index 22c4c52b..066b7f76 100644 --- a/src/experimental/_impl/_pnoise_contour_impl.scad +++ b/src/experimental/_impl/_pnoise_contour_impl.scad @@ -7,7 +7,7 @@ function _pnoise_contour_step_sub(x, y, current_noise, seed, step_leng, step_ang let( nx = x + step_leng * cos(theta), ny = y + step_leng * sin(theta), - new_noise = pnoise2([[nx, ny]], seed)[0], + new_noise = pnoise2(nx, ny, seed), delta = abs(new_noise - current_noise) ) delta < min_delta ? @@ -17,7 +17,7 @@ function _pnoise_contour_step_sub(x, y, current_noise, seed, step_leng, step_ang function _pnoise_contour_step(x, y, heading, noise, seed, step_leng, step_angle) = _pnoise_contour_step_sub( x, y, - is_undef(noise) ? pnoise2([[x, y]], seed)[0] : noise, + is_undef(noise) ? pnoise2(x, y, seed) : noise, seed, step_leng, step_angle, heading, INFINITY, heading, -1, -1, -1, heading - 90 );