From 6074b36c996d4858983afcff09ec04043187540e Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Thu, 5 Feb 2026 11:49:33 -0800 Subject: [PATCH] Remove unused function --- html/images/space.svg | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/html/images/space.svg b/html/images/space.svg index 6c87419..26616e6 100644 --- a/html/images/space.svg +++ b/html/images/space.svg @@ -1135,40 +1135,6 @@ function isLandable(edge) { // return Object.is(slope(edge), +0); } -function edgeContactPosition(xc, yc, x, y, edge, radius) { - const baseSlope = slope(edge); - // if (Object.is(baseSlope, 0)) s.isLanded = true; - let { xa, ya, xb, yb } = edge; - const positionSeg = { x1: x, y1: y, x2: xc, y2: yc }; - const edgeSeg = { x1: xa, y1: ya, x2: xb, y2: yb }; - - drawLine(x, y, xc, yc, "green"); - - const baseNrmlIntxn = perpIntxn(baseSlope, xa, ya, x, y); - const basePosIntxn = lineIntxnPt(edgeSeg, positionSeg); - - const baseSegLength = distance(baseNrmlIntxn.x, baseNrmlIntxn.y, basePosIntxn.x, basePosIntxn.y); - const normalSegLength = distance(baseNrmlIntxn.x, baseNrmlIntxn.y, x, y); - - drawLine(baseNrmlIntxn.x, baseNrmlIntxn.y, basePosIntxn.x, basePosIntxn.y, "blue"); - drawLine(baseNrmlIntxn.x, baseNrmlIntxn.y, x, y, "purple"); - - const theta = Math.atan(normalSegLength / baseSegLength); - const h = (radius)/ Math.sin(theta); - - const cl = document.createElementNS(namespaceURIsvg, 'line'); - cl.setAttribute('x1', basePosIntxn.x); - cl.setAttribute('y1', basePosIntxn.y); - cl.setAttribute('x2', x); - cl.setAttribute('y2', y); - - const pt = cl.getPointAtLength(h); - drawLine(basePosIntxn.x, basePosIntxn.y, pt.x, pt.y, "yellow"); - - // return cl.getPointAtLength(h); - return pt; -} - function lineIntxnPt({ x1, y1, x2, y2 }, { x1: x3, y1: y3, x2: x4, y2: y4 }) { // https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line const denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);