Also connect lines of convex hull
This commit is contained in:
parent
0677a26040
commit
2fa1204d82
16
Diagram.hs
16
Diagram.hs
@ -104,6 +104,18 @@ showConvexHullPoints = Diag f
|
|||||||
vtch = grahamGetCH vt
|
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
|
-- |Creates a Diagram that shows an XAxis which is bound
|
||||||
-- by the dimensions given in xD from DiagProp.
|
-- by the dimensions given in xD from DiagProp.
|
||||||
showXAxis :: Diag
|
showXAxis :: Diag
|
||||||
@ -138,8 +150,8 @@ diag p = case alg p of
|
|||||||
(mconcat [showCoordinates, showXAxis, showYAxis, showWhiteRectB])
|
(mconcat [showCoordinates, showXAxis, showYAxis, showWhiteRectB])
|
||||||
p
|
p
|
||||||
1 -> mkDiag
|
1 -> mkDiag
|
||||||
(mconcat [showConvexHullPoints, showCoordinates,
|
(mconcat [showConvexHullPoints, showConvexHullLines,
|
||||||
showXAxis, showYAxis, showWhiteRectB])
|
showCoordinates, showXAxis, showYAxis, showWhiteRectB])
|
||||||
p
|
p
|
||||||
_ -> mempty
|
_ -> mempty
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user