Maintainer | ch.howard@zoho.com |
---|---|
Safe Haskell | None |
Run an example function to view an image, or study the function source code for to see how the library can be used.
- example2D :: IO ()
- examplePly :: IO ()
- examplePly2 :: IO ()
- examplePly3 :: IO ()
- examplePly4 :: IO ()
- examplePly5 :: IO ()
Documentation
Generates an example random walk array and displays it as a 2-dimensional intensity graph
example2D :: IO() example2D = do a <- graph height width radius walkfactor seed iterations scalefactor displayWindow (width, height) black "Mars" (toImage a (lightnessInt hue (minMax (elems a)))) where (width, height) = (300, 300) radius = 30 walkfactor = 30 seed = 9484 hue = 272 iterations = 200 scalefactor = 1
examplePly :: IO ()Source
Generates a random walk array, converts it PLY ascii format, and output the PLY to a file called "out.ply".
examplePly = do a <- graph height width radius walkfactor seed iterations scalefactor writeFile "out.ply" $ (toPly . surface) a where (width, height) = (400, 400) radius = 10 walkfactor = 10 seed = 4748830300 iterations = 400 scalefactor = 1
examplePly2 :: IO ()Source
examplePly3 :: IO ()Source
examplePly4 :: IO ()Source
examplePly5 :: IO ()Source
Warning: Large output file with 1 million vertices! May take a while to complete, with 40000 iterations.