down_face c = Face.Face v0' v1' v2' v3'
where
delta = (1/2)*(h c)
- v0' = (center c) + (delta, delta, -delta)
+ v0' = (center c) + (-delta, -delta, -delta)
v1' = (center c) + (-delta, delta, -delta)
- v2' = (center c) + (-delta, -delta, -delta)
+ v2' = (center c) + (delta, delta, -delta)
v3' = (center c) + (delta, -delta, -delta)
fv' = rotate (Tetrahedron.fv (tetrahedron8 c)) cwx
+tetrahedron12 :: Cube -> Tetrahedron
+tetrahedron12 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (down_face c)
+ v2' = Face.v0 (down_face c)
+ v3' = Face.v1 (down_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron8 c)) cwy
+
+
+tetrahedron13 :: Cube -> Tetrahedron
+tetrahedron13 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (down_face c)
+ v2' = Face.v1 (down_face c)
+ v3' = Face.v2 (down_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron12 c)) ccwz
+
+
+tetrahedron14 :: Cube -> Tetrahedron
+tetrahedron14 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (down_face c)
+ v2' = Face.v2 (down_face c)
+ v3' = Face.v3 (down_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron13 c)) (ccwz . ccwz)
+
+
+tetrahedron15 :: Cube -> Tetrahedron
+tetrahedron15 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (down_face c)
+ v2' = Face.v3 (down_face c)
+ v3' = Face.v0 (down_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron12 c)) cwz
+
+
tetrahedrons :: Cube -> [Tetrahedron]
tetrahedrons c =
[tetrahedron0 c,
tetrahedron8 c,
tetrahedron9 c,
tetrahedron10 c,
- tetrahedron11 c
- --tetrahedron12 c,
- -- tetrahedron13 c,
- -- tetrahedron14 c,
- -- tetrahedron15 c,
+ tetrahedron11 c,
+ tetrahedron12 c,
+ tetrahedron13 c,
+ tetrahedron14 c,
+ tetrahedron15 c
-- tetrahedron16 c,
-- tetrahedron17 c,
-- tetrahedron18 c,
prop_tetrahedron11_volumes_positive :: Cube -> Bool
prop_tetrahedron11_volumes_positive c =
volume (tetrahedron11 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron12_volumes_positive :: Cube -> Bool
+prop_tetrahedron12_volumes_positive c =
+ volume (tetrahedron12 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron13_volumes_positive :: Cube -> Bool
+prop_tetrahedron13_volumes_positive c =
+ volume (tetrahedron13 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron14_volumes_positive :: Cube -> Bool
+prop_tetrahedron14_volumes_positive c =
+ volume (tetrahedron14 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron15_volumes_positive :: Cube -> Bool
+prop_tetrahedron15_volumes_positive c =
+ volume (tetrahedron15 c) > 0
putStr "prop_tetrahedron11_volumes_positive... "
quickCheckWith qc_args prop_tetrahedron11_volumes_positive
+ putStr "prop_tetrahedron12_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron12_volumes_positive
+
+ putStr "prop_tetrahedron13_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron13_volumes_positive
+
+ putStr "prop_tetrahedron14_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron14_volumes_positive
+
+ putStr "prop_tetrahedron15_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron15_volumes_positive
+
putStr "prop_v0_all_equal... "
quickCheckWith qc_args prop_v0_all_equal