Main.hs 1.16 KB
Newer Older
1 2 3 4 5
{-
 -  Fulsom (The Solid Modeller, written in Haskell)
 -
 -  Copyright 1990,1991,1992,1993 Duncan Sinclair
 -
6
 - Permission to use, copy, modify, and distribute this software for any
7 8 9 10 11 12
 - purpose and without fee is hereby granted, provided that the above
 - copyright notice and this permission notice appear in all copies, and
 - that my name not be used in advertising or publicity pertaining to this
 - software without specific, written prior permission.  I makes no
 - representations about the suitability of this software for any purpose.
 - It is provided ``as is'' without express or implied warranty.
13
 -
14
 - Duncan Sinclair 1993.
15
 -
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 - Main program.
 -
 -}

module Main(main) where

import Shapes
import Raster
import Quad
import Oct
import Csg
import Interval
import Types
import Vector
import Kolor
import Matrix
import Patchlevel

34
import Control.Monad
35
import System.Environment
36
import System.IO
37
import NofibUtils
38

39
main = replicateM_ 1000 $ do
40 41 42 43 44
    argv <- getArgs
    let
	n = case argv of
	      [a] -> read a
	      _   -> 7
45
    hSetBinaryMode stdout True
46
    print (hash (picture n))
47

48 49 50 51
picture n = go n pic

go :: Int -> Csg -> [Char]
go n = (cdraw n) . quadoct . (octcsg n)