Also connect lines of convex hull

This commit is contained in:
hasufell 2014-10-08 19:31:55 +02:00
parent 0677a26040
commit 2fa1204d82
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -104,6 +104,18 @@ showConvexHullPoints = Diag f
vtch = grahamGetCH vt
showConvexHullLines :: Diag
showConvexHullLines = Diag f
where
f _ vt
= (strokeTrail .
fromVertices .
flip (++) [head $ grahamGetCH vt] .
grahamGetCH $
vt
) # moveTo (head $ grahamGetCH vt) # lc red
-- |Creates a Diagram that shows an XAxis which is bound
-- by the dimensions given in xD from DiagProp.
showXAxis :: Diag
@ -138,8 +150,8 @@ diag p = case alg p of
(mconcat [showCoordinates, showXAxis, showYAxis, showWhiteRectB])
p
1 -> mkDiag
(mconcat [showConvexHullPoints, showCoordinates,
showXAxis, showYAxis, showWhiteRectB])
(mconcat [showConvexHullPoints, showConvexHullLines,
showCoordinates, showXAxis, showYAxis, showWhiteRectB])
p
_ -> mempty