X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;f=mandel_wall.lua;h=3c1f7419ff81a0e3269e3e999fa770b47771e384;hb=16d14ce7ffc1e70269fda8d375f1da11c3907af8;hp=127a27ba0c493376ed99fe4dc233eecc9017ba70;hpb=035227716eaa7bd36dad6c33a6e3addda84cc4d7;p=raymarcher.git diff --git a/mandel_wall.lua b/mandel_wall.lua index 127a27b..3c1f741 100644 --- a/mandel_wall.lua +++ b/mandel_wall.lua @@ -12,6 +12,8 @@ local T = Textures require "Render" + + local lights = {V.new{1,-1,1}} local plane_normal = V.normalize(V.new{0.0,-1,0.0}) @@ -19,21 +21,29 @@ local texture_y = V.normalize(V.cross(plane_normal,V.x)) local texture_x = V.cross(texture_y,plane_normal) local scene = { - -- sdf = P.make_plane(V.new{0,0,0}, plane_normal, - -- T.make_phong_texture(lights, - -- 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), - -- texture_x, texture_y), - -- 0.2, 1.0, 0, 1)), - - sdf = P.make_plane(V.origin, plane_normal, T.make_phong_texture(lights,T.map_rectangular(T.make_solid_pigment({0.5,0.2,1.0}), texture_x, texture_y), 0.2, 1.0, 0.5, 20)), + sdf = P.make_plane(V.new{0,0,0}, plane_normal, + T.make_phong_texture(lights, + T.map_rectangular( + T.make_mandelbrot_pigment( + make_image_pigment("images/wood1.ppm",1), + make_image_pigment("images/wood2.ppm",1), + 20), + texture_x, texture_y), + 0.2, 1.0, 0, 1)), + + -- sdf = P.make_plane(V.origin, plane_normal, + -- T.make_phong_texture( + -- lights, + -- T.map_rectangular( + -- -- T.make_solid_pigment({0.5,0.2,1.0}), + -- T.make_checkered_pigment( + -- make_image_pigment("images/wood1.ppm", 1), + -- make_image_pigment("images/wood2.ppm", 1)), + -- texture_x, texture_y), 0.2, 1.0, 0.5, 20)), camera = {location = V.new{0,-5,0}, point_at = V.new{0,0,0}, right = V.x, fov = 1}} -Render.render(scene, 300, 200, "mandel_wall.ppm") +Render.render(scene, 1280, 960, "mandel_wall.ppm")