This project is a challenge based on the book The raytracer challenge of Jamis Buck. Its entirely written in Haskell too make it even more challenging. It combines functional programming with lineair algebra learned as part of my pre-master.
https://www.haskell.org/downloads/
- ghci 8.10 >=
- cabal 2.0 >=
cabal new-repl
Chapter 1
ghci> :l app/Chapter1
- enter velocity of projectile (for example use 11.5)
ghci> 11.5
ghci> :main
Chapter 4
ghci> :l app/Chapter4
ghci> :main
Chapter 5
ghci> :l app/Chapter5
ghci> :main
Chapter 6
- note this is gonna take some time.
ghci> :l app/Chapter6
ghci> :main
cabal test
cabal configure --enable-coverage
cabal configure --enable-benchmarks && cabal build && cabal bench
cabal new-bench
cabal bench --benchmark-option --output=bench.html
rm Main.tix && cabal bench --benchmark-option --output=bench.html
Use stan for static code analysis
https://github.com/kowainik/stan
stan report
install profiteur for tree view
https://github.com/jaspervdj/profiteur
cabal configure --enable-profiling
cabal build
in build directory find Raytracer-exe
execute
./RayTracer.exe +RTS -p -RTS
open in browser: Raytracer-exe.prof.html
cabal configure --enable-library-profiling --enable-executable-profiling --enable-tests --enable-benchmarks --enable-coverage --enable-library-coverage --enable-profiling