bug fixes, x and y coords were swapped
This commit is contained in:
parent
ceb03f8e98
commit
30e714bd60
2 changed files with 3 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ main :: IO ()
|
|||
main = do
|
||||
image <- readImageRGB VU "sierra.jpg"
|
||||
gen <- getStdGen
|
||||
print gen
|
||||
let dims = (cols image, rows image)
|
||||
let triangleList = sortOn Tri.area . withStrategy (parListChunk 50 rseq) . take 50 . map (Tri.getRandomTriangle image) . genList $ gen
|
||||
let triangleList = sortOn (negate . Tri.area) . withStrategy (parListChunk 50 rseq) . take 600 . map (Tri.getRandomTriangle image) . genList $ gen
|
||||
mainWith . mconcat . map (renderTri image) $ triangleList
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ makeTriangle verts col = fromVertices verts
|
|||
|
||||
|
||||
-- tupleFromIntegral :: (Int, Int) -> (Int, Int) -> (Double, Double)
|
||||
tupleFromIntegral (cols, rows) (a, b) = (fromIntegral a, fromIntegral b)
|
||||
tupleFromIntegral (cols, rows) (a, b) = (fromIntegral b, fromIntegral a)
|
||||
-- tupleFromIntegral (cols, rows) (a, b) = ((a `divv` cols) , ((rows - b) `divv` rows))
|
||||
|
||||
divv :: Int -> Int -> Double
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue