DIAG: simplify by using drawP

This commit is contained in:
hasufell 2014-11-30 20:24:10 +01:00
parent 78a3dd8b95
commit 562f7a58e8
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -87,9 +87,8 @@ polyLines = Diag pp
polyIntersection :: Diag
polyIntersection = Diag pi'
where
pi' p (Objects (x:y:_)) = position (zip vtpi (repeat dot))
pi' p (Objects (x:y:_)) = drawP vtpi (dotSize p) red
where
dot = (circle $ dotSize p :: Diagram Cairo R2) # fc red # lc red
vtpi = intersectionPoints
. sortLexPolys
$ (sortLexPoly x,
@ -120,12 +119,7 @@ polyIntersectionText = Diag pit'
convexHP :: Diag
convexHP = Diag chp
where
chp p (Object vt) =
position (zip vtch
(repeat dot))
where
dot = (circle $ dotSize p :: Diagram Cairo R2) # fc red # lc red
vtch = grahamCH vt
chp p (Object vt) = drawP (grahamCH vt) (dotSize p) red
chp _ _ = mempty