ALGO: fix generation of gif

This is a good guess... the maximum of possible steps shouldn't
be higher than twice the length of the points.
This commit is contained in:
hasufell 2014-10-12 19:22:37 +02:00
parent 37b38115ae
commit 56ea542535
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 2 additions and 2 deletions

View File

@ -104,8 +104,8 @@ grahamGetCH vs =
-- visualizing it.
grahamGetCHSteps :: [PT] -> [[PT]]
grahamGetCHSteps vs =
(++) (rmdups . reverse . g (length vs) lH $ lHRest)
(rmdups . init . reverse . g (length vs) uH $ uHRest)
(++) (rmdups . reverse . g ((* 2) . length $ vs) lH $ lHRest)
(rmdups . init . reverse . g ((* 2) . length $ vs) uH $ uHRest)
where
sortedXY = fmap p2 . sortLex . fmap unp2 $ vs
(lH, lHRest) = first reverse . splitAt 3 $ sortedXY