X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;h=6c13f4bbb429f2a185cdd1eaae3a541f1b147cb8;hb=b9c6d5f4f9cf3e0e8c32499959c879e6300717f6;hp=73ed58863595cab2da3bd8a4a0e98cd2f5f69ad4;hpb=d1ee387490ef0ada8781f4bf81f82cce7f0006ba;p=spline3.git diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index 73ed588..6c13f4b 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -6,6 +6,7 @@ import Prelude hiding (LT) import Test.QuickCheck (Arbitrary(..), Gen) import Cardinal +import Comparisons (nearly_ge) import FunctionValues import Misc (factorial) import Point @@ -42,7 +43,10 @@ instance Show Tetrahedron where instance ThreeDimensional Tetrahedron where center t = ((v0 t) + (v1 t) + (v2 t) + (v3 t)) `scale` (1/4) contains_point t p = - (b0 t p) >= 0 && (b1 t p) >= 0 && (b2 t p) >= 0 && (b3 t p) >= 0 + (b0 t p) `nearly_ge` 0 && + (b1 t p) `nearly_ge` 0 && + (b2 t p) `nearly_ge` 0 && + (b3 t p) `nearly_ge` 0 polynomial :: Tetrahedron -> (RealFunction Point)