From 1313abe4ce368ffc60df30cac65175dffdde7cc0 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 23 May 2017 20:40:47 -0700 Subject: [PATCH] Fixed Bug in Equation For Intersection of Line and Plane MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The equation to find the value of ’t' for the intersection of a line and a plane does not appear to be entirely correct. Please double-check. --- lib/function/geometry/intersect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/function/geometry/intersect.js b/lib/function/geometry/intersect.js index 1ce3fa18a..ad2be7e55 100644 --- a/lib/function/geometry/intersect.js +++ b/lib/function/geometry/intersect.js @@ -125,7 +125,7 @@ function factory (type, config, load, typed) { } function _intersectLinePlane(x1, y1, z1, x2, y2, z2, x, y, z, c){ - var t = (c - x1*x - y1*y - z1*z)/(x2*x + y2*y + z2*z - x1 - y1 - z1); + var t = (c - x1*x - y1*y - z1*z)/(x2*x + y2*y + z2*z - x1*x - y1*y - z1*z); var px = x1 + t * (x2 - x1); var py = y1 + t * (y2 - y1); var pz = z1 + t * (z2 - z1);