(show (i c)) ++ "," ++ (show (j c)) ++ "," ++ (show (k c))
+-- | Returns an empty 'Cube'.
empty_cube :: Cube
empty_cube = Cube 0 0 0 0 empty_values
instance ThreeDimensional Cube where
-- | The center of Cube_ijk coincides with v_ijk at
- -- (ih, jh, kh). See Sorokina and Zeilfelder, p. 76.
+ -- (ih, jh, kh). See Sorokina and Zeilfelder, p. 76.
center c = (x, y, z)
where
delta = h c
y = delta * j'
z = delta * k'
+ -- | It's easy to tell if a point is within a cube; just make sure
+ -- that it falls on the proper side of each of the cube's faces.
contains_point c p
| (x_coord p) < (xmin c) = False
| (x_coord p) > (xmax c) = False