Colours are now Vectors, added rainbow pigment.
[raymarcher.git] / mandelbulb.lua
index 7d7a011..f39c67b 100644 (file)
@@ -18,7 +18,8 @@ local scene = {
    sdf = P.make_mandelbulb(V.origin, 100, 8,
                            T.make_phong_texture(
                               {V.new{3,-5,3}},
-                              T.make_solid_pigment{0,0.5,1.0},
+                              -- T.make_solid_pigment{0,0.5,1.0},
+                              T.map_spherical(T.make_rainbow_pigment(0.1), V.origin, 1, 1),
                               0.1, 1.0, 0.0, 30)),
 
    camera = {location = V.new{0,-5,0},
@@ -28,4 +29,5 @@ local scene = {
 
 Render.eps = 0.001
 Render.bg_col = {0,0,0}
-Render.render(scene, 2560, 1440, "out/mandelbulb.ppm")
+Render.render(scene, 2560, 1440, "out/mandelbulb_rainbow.ppm")
+-- Render.render(scene, 2560, 1440, "out/mandelbulb_rainbow.ppm")