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" ++
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 &&