Work on textures and lighting
This commit is contained in:
+8
-6
@@ -1,6 +1,7 @@
|
||||
import Criterion.Main
|
||||
|
||||
import Dodge.RandomHelp
|
||||
import RandomHelp
|
||||
import Shader.Poke.Triangulate
|
||||
|
||||
import Geometry
|
||||
import Dodge.Creature.Inanimate
|
||||
@@ -13,24 +14,25 @@ import Data.List (zip4)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
[ps1, ps2, ps3, ps4] <- mapM randomPoints [5,10,50,500]
|
||||
--[ps1, ps2, ps3, ps4] <- mapM randomPoints [5,10,50,500]
|
||||
[ps1, ps2,ps3] <- mapM randomPoints [5,10,50]
|
||||
-- fs <- replicateM 500 (randomRIO (1,20))
|
||||
defaultMain
|
||||
[ bgroup "polyToTris tests"
|
||||
[ bench "polyToTris 5" $ nf polyToTris ps1
|
||||
[ bench "polyToTris 5" $ nf ( polyToTris) ps1
|
||||
, bench "polyToTris 10" $ nf polyToTris ps2
|
||||
, bench "polyToTris 50" $ nf polyToTris ps3
|
||||
, bench "polyToTris 500" $ nf polyToTris ps4
|
||||
--, bench "polyToTris 500" $ nf polyToTris ps4
|
||||
]
|
||||
, bgroup "polyToTriFold tests"
|
||||
[ bench "polyToTriFold 5" $ nf polyToTris'' ps1
|
||||
, bench "polyToTriFold 10" $ nf polyToTris'' ps2
|
||||
, bench "polyToTriFold 50" $ nf polyToTris'' ps3
|
||||
, bench "polyToTriFold 500" $ nf polyToTris'' ps4
|
||||
--, bench "polyToTriFold 500" $ nf polyToTris'' ps4
|
||||
]
|
||||
]
|
||||
|
||||
uncurry4 f (a,b,c,d) = f a b c d
|
||||
--uncurry4 f (a,b,c,d) = f a b c d
|
||||
|
||||
randomPoints :: Int -> IO [Point2]
|
||||
randomPoints i = getStdGen <&> evalState (replicateM i $ randInCirc 500)
|
||||
|
||||
Reference in New Issue
Block a user