Improve redability, add docs

This commit is contained in:
hasufell
2014-10-13 03:25:22 +02:00
parent 87393af71a
commit 2c1d5fa5ec
2 changed files with 17 additions and 12 deletions

View File

@@ -14,15 +14,13 @@ import Parser.Meshparser
-- |Return a list of tuples used by 'gifMain' to generate an animated gif.
gifDiag :: DiagProp -> [PT] -> [(Diagram Cairo R2, GifDelay)]
gifDiag p xs =
fmap (\x -> (x, 100)) .
fmap (\x -> x <> nonChDiag) .
fmap (\x -> (x, 100)) .
fmap (\x -> x <> nonChDiag) .
flip (++)
[mkDiag (convexHullPointsText `mappend`
convexHullPoints)
p xs <> lastUpperHull <> lastLowerHull] $
(lowerHullList ++
((<> lastLowerHull) <$>
upperHullList))
convexHullPoints)
p xs <> lastUpperHull <> lastLowerHull] $
(lowerHullList ++ ((<> lastLowerHull) <$> upperHullList))
where
upperHullList = convexHullLinesIntervalUpper p xs
lastUpperHull = last upperHullList