instance Show Cube where
show c =
- "Cube_" ++ (show (i c)) ++ "," ++ (show (j c)) ++ "," ++ (show (k c)) ++
- " (Center: " ++ (show (center c)) ++ ")" ++
- " (xmin: " ++ (show (xmin c)) ++ ")" ++
- " (xmax: " ++ (show (xmax c)) ++ ")" ++
- " (ymin: " ++ (show (ymin c)) ++ ")" ++
- " (ymax: " ++ (show (ymax c)) ++ ")" ++
- " (zmin: " ++ (show (zmin c)) ++ ")" ++
- " (zmax: " ++ (show (zmax c)) ++ ")"
+ "Cube_" ++ subscript ++ "\n" ++
+ " h: " ++ (show (h c)) ++ "\n" ++
+ " Center: " ++ (show (center c)) ++ "\n" ++
+ " xmin: " ++ (show (xmin c)) ++ "\n" ++
+ " xmax: " ++ (show (xmax c)) ++ "\n" ++
+ " ymin: " ++ (show (ymin c)) ++ "\n" ++
+ " ymax: " ++ (show (ymax c)) ++ "\n" ++
+ " zmin: " ++ (show (zmin c)) ++ "\n" ++
+ " zmax: " ++ (show (zmax c)) ++ "\n"
+ where
+ subscript =
+ (show (i c)) ++ "," ++ (show (j c)) ++ "," ++ (show (k c))
+
empty_cube :: Cube
empty_cube = Cube 0 0 0 0 empty_values
v3' = v2 (top_face c)
fv' = rotate (Tetrahedron.fv (tetrahedron0 c)) ccwx
+tetrahedron6 :: Cube -> Tetrahedron
tetrahedron6 c =
Tetrahedron fv' v0' v1' v2' v3'
where
v3' = v3 (top_face c)
fv' = rotate (Tetrahedron.fv (tetrahedron0 c)) (ccwx . ccwx)
+tetrahedron7 :: Cube -> Tetrahedron
tetrahedron7 c =
Tetrahedron fv' v0' v1' v2' v3'
where