left_face c = Face.Face v0' v1' v2' v3'
where
delta = (1/2)*(h c)
- v0' = (center c) + (-delta, -delta, delta)
- v1' = (center c) + (delta, -delta, delta)
- v2' = (center c) + (delta, -delta, -delta)
- v3' = (center c) + (-delta, -delta, -delta)
+ v0' = (center c) + (delta, -delta, delta)
+ v1' = (center c) + (-delta, -delta, delta)
+ v2' = (center c) + (-delta, -delta, -delta)
+ v3' = (center c) + (delta, -delta, -delta)
-- | The right (in the direction of y) face of the cube.
right_face c = Face.Face v0' v1' v2' v3'
where
delta = (1/2)*(h c)
- v0' = (center c) + (-delta, delta, -delta)
- v1' = (center c) + (delta, delta, -delta)
- v2' = (center c) + (delta, delta, delta)
- v3' = (center c) + (-delta, delta, delta)
+ v0' = (center c) + (-delta, delta, delta)
+ v1' = (center c) + (delta, delta, delta)
+ v2' = (center c) + (delta, delta, -delta)
+ v3' = (center c) + (-delta, delta, -delta)
tetrahedron0 :: Cube -> Tetrahedron
fv' = rotate (Tetrahedron.fv (tetrahedron12 c)) cwz
+tetrahedron16 :: Cube -> Tetrahedron
+tetrahedron16 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (right_face c)
+ v2' = Face.v0 (right_face c)
+ v3' = Face.v1 (right_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron0 c)) ccwz
+
+
+tetrahedron17 :: Cube -> Tetrahedron
+tetrahedron17 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (right_face c)
+ v2' = Face.v1 (right_face c)
+ v3' = Face.v2 (right_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron16 c)) cwy
+
+
+tetrahedron18 :: Cube -> Tetrahedron
+tetrahedron18 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (right_face c)
+ v2' = Face.v2 (right_face c)
+ v3' = Face.v3 (right_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron16 c)) (cwy . cwy)
+
+
+tetrahedron19 :: Cube -> Tetrahedron
+tetrahedron19 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (right_face c)
+ v2' = Face.v3 (right_face c)
+ v3' = Face.v0 (right_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron16 c)) ccwy
+
+
+tetrahedron20 :: Cube -> Tetrahedron
+tetrahedron20 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (left_face c)
+ v2' = Face.v0 (left_face c)
+ v3' = Face.v1 (left_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron0 c)) cwz
+
+
+tetrahedron21 :: Cube -> Tetrahedron
+tetrahedron21 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (left_face c)
+ v2' = Face.v1 (left_face c)
+ v3' = Face.v2 (left_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron20 c)) ccwy
+
+
+tetrahedron22 :: Cube -> Tetrahedron
+tetrahedron22 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (left_face c)
+ v2' = Face.v2 (left_face c)
+ v3' = Face.v3 (left_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron20 c)) ccwy
+
+
+tetrahedron23 :: Cube -> Tetrahedron
+tetrahedron23 c =
+ Tetrahedron fv' v0' v1' v2' v3'
+ where
+ v0' = center c
+ v1' = center (left_face c)
+ v2' = Face.v3 (left_face c)
+ v3' = Face.v0 (left_face c)
+ fv' = rotate (Tetrahedron.fv (tetrahedron20 c)) ccwy
+
+
tetrahedrons :: Cube -> [Tetrahedron]
tetrahedrons c =
[tetrahedron0 c,
tetrahedron12 c,
tetrahedron13 c,
tetrahedron14 c,
- tetrahedron15 c
- -- tetrahedron16 c,
- -- tetrahedron17 c,
- -- tetrahedron18 c,
- -- tetrahedron19 c,
- -- tetrahedron20 c,
- -- tetrahedron21 c,
- -- tetrahedron21 c,
- -- tetrahedron22 c,
- -- tetrahedron23 c,
- -- tetrahedron24 c
- ]
+ tetrahedron15 c,
+ tetrahedron16 c,
+ tetrahedron17 c,
+ tetrahedron18 c,
+ tetrahedron19 c,
+ tetrahedron20 c,
+ tetrahedron21 c,
+ tetrahedron22 c,
+ tetrahedron23 c]
prop_tetrahedron15_volumes_positive :: Cube -> Bool
prop_tetrahedron15_volumes_positive c =
volume (tetrahedron15 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron16_volumes_positive :: Cube -> Bool
+prop_tetrahedron16_volumes_positive c =
+ volume (tetrahedron16 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron17_volumes_positive :: Cube -> Bool
+prop_tetrahedron17_volumes_positive c =
+ volume (tetrahedron17 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron18_volumes_positive :: Cube -> Bool
+prop_tetrahedron18_volumes_positive c =
+ volume (tetrahedron18 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron19_volumes_positive :: Cube -> Bool
+prop_tetrahedron19_volumes_positive c =
+ volume (tetrahedron19 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron20_volumes_positive :: Cube -> Bool
+prop_tetrahedron20_volumes_positive c =
+ volume (tetrahedron20 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron21_volumes_positive :: Cube -> Bool
+prop_tetrahedron21_volumes_positive c =
+ volume (tetrahedron21 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron22_volumes_positive :: Cube -> Bool
+prop_tetrahedron22_volumes_positive c =
+ volume (tetrahedron22 c) > 0
+
+-- | This pretty much repeats the prop_all_volumes_positive property,
+-- but will let me know which tetrahedrons's vertices are disoriented.
+prop_tetrahedron23_volumes_positive :: Cube -> Bool
+prop_tetrahedron23_volumes_positive c =
+ volume (tetrahedron23 c) > 0
putStr "prop_tetrahedron15_volumes_positive... "
quickCheckWith qc_args prop_tetrahedron15_volumes_positive
+ putStr "prop_tetrahedron16_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron16_volumes_positive
+
+ putStr "prop_tetrahedron17_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron17_volumes_positive
+
+ putStr "prop_tetrahedron18_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron18_volumes_positive
+
+ putStr "prop_tetrahedron19_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron19_volumes_positive
+
+ putStr "prop_tetrahedron20_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron20_volumes_positive
+
+ putStr "prop_tetrahedron21_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron21_volumes_positive
+
+ putStr "prop_tetrahedron22_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron22_volumes_positive
+
+ putStr "prop_tetrahedron23_volumes_positive... "
+ quickCheckWith qc_args prop_tetrahedron23_volumes_positive
+
putStr "prop_v0_all_equal... "
quickCheckWith qc_args prop_v0_all_equal