X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;h=5b459fea2870de5c2fed88ee9f9e5b57c7e5cfc9;hb=89a8f8f3728c6e8730a37304708312b67bc23274;hp=d468f0c570a920fe3967fdd7e20973ef2cd9945e;hpb=c8994e4028a753c901271a1238b579a2f609707f;p=spline3.git diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index d468f0c..5b459fe 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -47,6 +47,7 @@ instance Arbitrary Tetrahedron where instance Show Tetrahedron where show t = "Tetrahedron:\n" ++ + " no: " ++ (show (number t)) ++ "\n" ++ " fv: " ++ (show (fv t)) ++ "\n" ++ " v0: " ++ (show (v0 t)) ++ "\n" ++ " v1: " ++ (show (v1 t)) ++ "\n" ++ @@ -55,7 +56,9 @@ instance Show Tetrahedron where instance ThreeDimensional Tetrahedron where - center t = ((v0 t) + (v1 t) + (v2 t) + (v3 t)) `scale` (1/4) + center (Tetrahedron _ v0' v1' v2' v3' _ _) = + (v0' + v1' + v2' + v3') `scale` (1/4) + contains_point t p = b0_unscaled `nearly_ge` 0 && b1_unscaled `nearly_ge` 0 &&