X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;f=mandel_floor.lua;h=0071eb0a9d6457dbdec3b7d3856ec83ca233488c;hb=f564e0e7248f977ea2397ea49e3d2e1804a65f7c;hp=518a41f77a727b5f81c167609c19c520615cc8b1;hpb=b2d510f61cb4ffa581aa62c1c97ee2ce73e5b1fb;p=raymarcher.git diff --git a/mandel_floor.lua b/mandel_floor.lua index 518a41f..0071eb0 100644 --- a/mandel_floor.lua +++ b/mandel_floor.lua @@ -16,26 +16,31 @@ local lights = {V.new{3,-3,1}} local scene = { sdf = - O.union( - O.diff( - O.diff( - O.diff( - P.make_sphere(V.new{0,0,1}, 1, - T.make_phong_texture(lights, - T.make_solid_pigment({0,1,0}), - 0.2, 0.7, 1.0, 100)), - P.make_sphere(V.new{0,0,1}, 0.8)), - P.make_pipe(V.new{0,0,1}, 0.5, V.new{0,1,0})), - P.make_pipe(V.new{0,0,1}, 0.5, V.new{1,0,0})), - - P.make_plane(V.new{0,0,0}, V.new{0,0,1}, + O.union{ + O.diff{P.make_sphere(V.new{0,0,0}, 1, + T.make_phong_texture(lights, + T.map_spherical( + T.make_checkered_pigment({0,1,0},{1,1,1}), + V.origin, 10, 10), + 0.2, 0.7, 1.0, 100)), + P.make_sphere(V.new{0,0,0}, 0.8), + P.make_pipe(V.new{0,0,0}, 0.5, V.new{0,1,0}), + P.make_pipe(V.new{0,0,0}, 0.5, V.new{1,0,0})}, + + P.make_plane(V.new{0,0,-1}, V.new{0,0,1}, T.make_phong_texture(lights, - T.make_mandelbrot_pigment({0,0,0}, 20), - 0.2, 1.0, 0, 1))), + T.map_rectangular( + T.make_mandelbrot_pigment( + T.make_checkered_pigment({0.5,0.2,1.0},{1,1,1}), + T.make_checkered_pigment({1,1,1},{0.5,0.2,1.0}), + 20), + V.x, V.y), + 0.2, 1.0, 0, 1))}, camera = {location = V.new{2,-5,1}, point_at = V.new{0,0,0}, right = V.x, fov = 1}} -Render.render(scene, 320, 200, "mandel_floor.ppm") +Render.render(scene, 1280, 960, "mandel_floor.ppm") +-- Render.render(scene, 320, 200, "mandel_floor.ppm")