1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 18:24:28 +02:00

average of 4 pts

This commit is contained in:
Justin Lin
2020-03-22 16:01:02 +08:00
parent 198bd33fc2
commit c2fad6fb2f

View File

@@ -40,7 +40,7 @@ function _case4_isolines(cell_pts, sigma) = [
];
function _case5_isolines(cell_pts, sigma) =
let(mdpz = ((cell_pts[0] + cell_pts[1]) / 2)[2])
let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4)
mdpz >= sigma ?
[
[interpolated_pt(cell_pts[0], cell_pts[1], sigma), interpolated_pt(cell_pts[1], cell_pts[2], sigma)],
@@ -65,7 +65,7 @@ function _case8_isolines(cell_pts, sigma) = _case7_isolines(cell_pts, sigma);
function _case9_isolines(cell_pts, sigma) = _case6_isolines(cell_pts, sigma);
function _case10_isolines(cell_pts, sigma) =
let(mdpz = ((cell_pts[0] + cell_pts[1]) / 2)[2])
let(mdpz = (cell_pts[0][2] + cell_pts[1][2] + cell_pts[2][2] + cell_pts[3][2]) / 4)
mdpz >= sigma ?
[
[interpolated_pt(cell_pts[0], cell_pts[1], sigma), interpolated_pt(cell_pts[0], cell_pts[3], sigma)],