mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-13 18:49:43 +01:00
refactor
This commit is contained in:
parent
812350bd48
commit
d1624f6405
@ -1,12 +1,11 @@
|
||||
function interpolated_pt(p0, p1, sigma) =
|
||||
let(
|
||||
x0 = p0[0],
|
||||
y0 = p0[1],
|
||||
z0 = p0[2],
|
||||
v = p1 - p0,
|
||||
t = (sigma - z0) / v[2]
|
||||
)
|
||||
[x0 + v[0] * t, y0 + v[1] * t, sigma];
|
||||
use <util/lerp.scad>;
|
||||
|
||||
function interpolated_pt(p0, p1, sigma) =
|
||||
lerp(
|
||||
[p0[0], p0[1], p0[2]],
|
||||
[p1[0], p1[1], p1[2]],
|
||||
(sigma - p0[2]) / (p1[2] - p0[2])
|
||||
);
|
||||
|
||||
/*
|
||||
Grid indexes
|
||||
|
Loading…
x
Reference in New Issue
Block a user