From 3c1462fa81c747581db4c6e13751532739ffaf80 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Thu, 31 May 2012 10:41:32 +0200 Subject: [PATCH] Slightly changed colors --- 06_Mandelbulb/Mandelbulb.lhs | 7 ++++--- 06_Mandelbulb/YGL.hs | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/06_Mandelbulb/Mandelbulb.lhs b/06_Mandelbulb/Mandelbulb.lhs index b992991..2131f0e 100644 --- a/06_Mandelbulb/Mandelbulb.lhs +++ b/06_Mandelbulb/Mandelbulb.lhs @@ -83,16 +83,17 @@ > -- And the shape function > initialWorld :: World > initialWorld = World { -> angle = makePoint3D (-30,-30,0) +> angle = makePoint3D (30,30,0) > , position = makePoint3D (0,0,0) -> , scale = 0.8 +> , scale = 1.0 > , box = Box3D { minPoint = makePoint3D (-2,-2,-2) > , maxPoint = makePoint3D (2,2,2) -> , resolution = 0.16 } +> , resolution = 0.02 } > , told = 0 > , cache = objectFunctionFromWorld initialWorld > } > +> objectFunctionFromWorld :: World -> [YObject] > objectFunctionFromWorld w = [Atoms atomList] > where atomListPositive = > getObject3DFromShapeFunction (shapeFunc (resolution (box w))) (box w) diff --git a/06_Mandelbulb/YGL.hs b/06_Mandelbulb/YGL.hs index fcc2b26..a645809 100644 --- a/06_Mandelbulb/YGL.hs +++ b/06_Mandelbulb/YGL.hs @@ -237,12 +237,18 @@ yMainLoop inputActionMap specular (Light 0) $= Color4 1 1 1 1 position (Light 0) $= Vertex4 1 1 0 1 light (Light 0) $= Enabled + ambient (Light 1) $= Color4 0 0 0 1 + diffuse (Light 1) $= Color4 1 0.9 0.0 1 + specular (Light 1) $= Color4 1 1 1 1 + position (Light 1) $= Vertex4 0 0 1 1 + light (Light 1) $= Enabled colorMaterial $= Just (Front,AmbientAndDiffuse) + -- materialDiffuse Front $= Color4 0.5 0.5 0.5 1 materialDiffuse Front $= Color4 0.5 0.5 0.5 1 materialAmbient Front $= Color4 0.5 0.5 0.5 1 materialSpecular Front $= Color4 0.2 0.2 0.2 1 materialEmission Front $= Color4 0.3 0.3 0.3 1 - materialShininess Front $= 50.0 + materialShininess Front $= 1.0 -- We enter the main loop mainLoop