The goal is to follow the "Ray Tracing in One Weekend" guide by Peter Shirley, Trevor David Black and Steve Hollasch with a twist. I'll make it with Haskell. This poses several challenges as my knowledge in Haskell is severely limited (mostly from IndaPlus {first year in KTH} and DD1366 Programmeringsparadigm, where the latter contains a few projects in the language). Another challenge is to convert the thinking of an imperative solution (in which the tutorial is written) to a functional paradigm.
To furthermore make the project fairly unique, I will make sure that my images are different scenes.
Comment: It should be noted that it is not quite possible to see any substantial change in color in the sphere with the human eye, however upon analysis with Paint it is noticable as a slight decrease in the amount of blue moving towards the edges of the picture, in accordance with expectations. To make this easier to demonstrate I made a modification where I let the blue and green be dependant on the z coordinate of the normalized outer normals of the sphere raised to the power 8. This increases the color change per z coordinate change drastically, see below.

-
Clone the repository
Open your terminal and run the following command:
git clone https://github.com/djonte/haskell-raytracer.git
-
Navigate to the project directory
cd haskell-raytracer -
Install the dependancies
stack install
-
Build and run the project
stack run
The solution will be implemented using Haskell.
lts-20.26
Haskell Image Processing Library (HIP)
Linear














