1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-07-09 09:24:16 +02:00
This commit is contained in:
Justin Lin
2021-01-04 10:08:42 +08:00
parent 812350bd48
commit d1624f6405

View File

@ -1,12 +1,11 @@
use <util/lerp.scad>;
function interpolated_pt(p0, p1, sigma) = function interpolated_pt(p0, p1, sigma) =
let( lerp(
x0 = p0[0], [p0[0], p0[1], p0[2]],
y0 = p0[1], [p1[0], p1[1], p1[2]],
z0 = p0[2], (sigma - p0[2]) / (p1[2] - p0[2])
v = p1 - p0, );
t = (sigma - z0) / v[2]
)
[x0 + v[0] * t, y0 + v[1] * t, sigma];
/* /*
Grid indexes Grid indexes