Merge branch 'master' of https://github.com/bgwines/image-triangles
This commit is contained in:
commit
80c096a65c
1 changed files with 7 additions and 2 deletions
|
|
@ -62,13 +62,18 @@ renderTriangles image nRounds dimensions areaCoeff nTrianglesPerRound gen round'
|
|||
opacity :: Double
|
||||
opacity = fromIntegral round' / fromIntegral nRounds
|
||||
|
||||
|
||||
area :: Maybe Double
|
||||
area = Just $ (\y -> DT.traceShow (round', y) y) $ 1 - (x + 0.1)
|
||||
where
|
||||
-- 0.000, 0.333, 0.666
|
||||
x = fromIntegral (round' - 1) / fromIntegral nRounds
|
||||
|
||||
triangles
|
||||
= take nTrianglesPerRound
|
||||
$ sortOn Tri.area
|
||||
. take numCandidates
|
||||
. filter (not . Tri.sharesCoords)
|
||||
. map (Tri.getRandomTriangle dimensions)
|
||||
. map (Tri.getRandomTriangle dimensions area)
|
||||
. genList
|
||||
$ gen
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue