-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.hs
52 lines (45 loc) · 1.86 KB
/
main.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{-# LANGUAGE UnicodeSyntax #-}
import Control.Concurrent
import NewtonianMethod
import IOinput
import Rendering
#ifdef __GUI_APP
import qualified Window as Win
#endif
defaultWindowSize = (500,500)
defaultSlice = ((10,-10),(10,-10))
filename = "fractal"
----------------------------------------------------------------Rendering
---------------------------------------------------------------------------- Impure Part
#ifdef __GUI_APP
main = do
getNumCapabilities >>= setNumCapabilities
win <- Win.create
return (0)
#else
main = do
getNumCapabilities >>= setNumCapabilities
putStrLn "Maks & Michal 2k18 >>= with love >> we present you with... "
putStrLn "---------------------------------------------------------- "
putStrLn " __ _ _ _ _ _ _ _ _ _ _ "
putStrLn " / _| | | | | \\ \\ | _|| _|_ _| "
putStrLn "| |_ _ __ __ _ ___| |_ __ _| | \\ \\ | |_ | |_ | | "
putStrLn "| _| '__/ _` |/ __| __/ _` | | /\\ \\| _|| _| | | "
putStrLn "| | | | | (_| | (__| || (_| | | / /\\ \\ |_ | |_ | | "
putStrLn "|_| |_| \\__,_|\\___|\\__\\__,_|_| /_/ \\_\\__||___| |_| "
putStrLn "---------------------------------------------------------- "
putStrLn " the ultimate newton method fractal yeeting software © "
putStrLn "---------------------------------------------------------- "
putStrLn " ...make sure you have read the user guide... "
putStrLn "To begin the ultimate yeet experience, enter no.of frames: "
n <- getLine
let nV = read n
putStrLn "Enter starting frame: (Int)"
i<- getLine
let iV = read i
fs <- getFS
if nV <= 1 then
write fs ("fractal" ++ ".bmp")
else
mapM_ (simAnimate fs ) [iV..nV]
#endif