1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00
This commit is contained in:
Justin Lin
2021-04-25 17:42:59 +08:00
parent ef6a1d1d1c
commit d49f9fbeec

View File

@@ -1,13 +0,0 @@
function tri_incentre(shape_pts) =
let(
pa = shape_pts[0],
pb = shape_pts[1],
pc = shape_pts[2],
a = norm(pb - pc),
b = norm(pc - pa),
c = norm(pa - pb)
)
[
(a * pa[0] + b * pb[0] + c * pc[0]),
(a * pa[1] + b * pb[1] + c * pc[1])
] / (a + b + c);