-- TODO: can I eliminate vec1?  And how about realToFrac?  What's the type
-- of utctDayTime?

{--------------------------------------------------------------------
    Tessellated grid
--------------------------------------------------------------------}

-- | Indices for a collection of triangles covering a grid with given
-- number of columns and rows (in vertices).
gridIndices :: (Enum n, Num n) => (n, n) -> [n]
gridIndices (cols,rows) =
  [ i * rows + j | ll <- lls cols rows , tri <- box ll , (i,j) <- tri ]
gridIndices :: (Enum n, Num n) => (n, n) -> [n]
gridIndices (cols,rows) =
  [ i * rows + j | ll <- lls cols rows , tri <- box ll , (i,j) <- tri ]
gridIndices (cols,rows) =
  [ i * rows + j | ll <- lls cols rows , tri <- box ll , (i,j) <- tri ]