mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-07-07 08:27:49 +02:00
refactor
This commit is contained in:
@ -1,12 +1,11 @@
|
|||||||
function interpolated_pt(p0, p1, sigma) =
|
use <util/lerp.scad>;
|
||||||
let(
|
|
||||||
x0 = p0[0],
|
function interpolated_pt(p0, p1, sigma) =
|
||||||
y0 = p0[1],
|
lerp(
|
||||||
z0 = p0[2],
|
[p0[0], p0[1], p0[2]],
|
||||||
v = p1 - p0,
|
[p1[0], p1[1], p1[2]],
|
||||||
t = (sigma - z0) / v[2]
|
(sigma - p0[2]) / (p1[2] - p0[2])
|
||||||
)
|
);
|
||||||
[x0 + v[0] * t, y0 + v[1] * t, sigma];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Grid indexes
|
Grid indexes
|
||||||
|
Reference in New Issue
Block a user