added README

This commit is contained in:
Nicole Dresselhaus 2014-10-24 22:47:01 +02:00
parent b034d6b942
commit 55778d2fc9
2 changed files with 4 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# htrace - a raytracer in Haskell
This is a little raytracer that i write/wrote for the lecture computergraphics in the winter 14/15.

View File

@ -56,6 +56,7 @@ diffuse (Collision pos n _ obj) s (Light lpos color int) =
else
ill
where
-- angle of light * (color * material)
ill = (*) (dot n $ normalize lightdir) <$> ((*) <$> color ^* i <*> materialDiffuse mat)
mat = getMaterial obj
blocked = raytrace (Ray pos lightdir) s