X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;h=613b863a49953b57120884b15c83d7ebd733a187;hb=ac9636ad08f50d7d40188dc8d29a8e2fdf169426;hp=b8d4fe67943ef30db4b14f00f87c7bc5bee96b2c;hpb=3a954903101eca7594a65824868517b9758e188d;p=spline3.git diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index b8d4fe6..613b863 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -72,7 +72,7 @@ instance ThreeDimensional Tetrahedron where center (Tetrahedron _ v0' v1' v2' v3' _) = (v0' + v1' + v2' + v3') `scale` (1/4) - contains_point t p = + contains_point t p0 = b0_unscaled `nearly_ge` 0 && b1_unscaled `nearly_ge` 0 && b2_unscaled `nearly_ge` 0 && @@ -82,19 +82,19 @@ instance ThreeDimensional Tetrahedron where -- would do if we used the regular b0,..b3 functions. b0_unscaled :: Double b0_unscaled = volume inner_tetrahedron - where inner_tetrahedron = t { v0 = p } + where inner_tetrahedron = t { v0 = p0 } b1_unscaled :: Double b1_unscaled = volume inner_tetrahedron - where inner_tetrahedron = t { v1 = p } + where inner_tetrahedron = t { v1 = p0 } b2_unscaled :: Double b2_unscaled = volume inner_tetrahedron - where inner_tetrahedron = t { v2 = p } + where inner_tetrahedron = t { v2 = p0 } b3_unscaled :: Double b3_unscaled = volume inner_tetrahedron - where inner_tetrahedron = t { v3 = p } + where inner_tetrahedron = t { v3 = p0 } polynomial :: Tetrahedron -> (RealFunction Point)