summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raytracer.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/raytracer.hs b/raytracer.hs
index 88b66ae..fa960f8 100644
--- a/raytracer.hs
+++ b/raytracer.hs
@@ -50,7 +50,7 @@ main = mapM writenum spherepos
alpha1 = 100 * degrees
alpha2 = 0 * degrees
-beta1 = 70 * degrees
+beta1 = 65 * degrees
beta2 = 120 * degrees
floorscale = 4
@@ -198,8 +198,9 @@ intersect_floor source (alpha, beta)
skycolor :: Coord -> Direction -> Color
skycolor source (alpha, beta) = (r,g,b)
where r = 60
- g = max 0 $ round $ (sqrt (alpha/6)) / (sqrt (90 * degrees)) * 128
+ g = max 0 $ round $ (sqrt (greenness/2)) * 64
b = max 0 $ round $ (sqrt (-beta+90*degrees)) / (sqrt (90 * degrees)) * 255
+ greenness = cos (alpha) + 1
data SphereIntersect = SphereIntersect Double Color deriving (Eq, Show) -- distance color
instance Ord SphereIntersect where