The Lambda Lab
/
projects
/
raymarcher.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweeks to mandel_wall.lua example.
[raymarcher.git]
/
mandel_wall.lua
diff --git
a/mandel_wall.lua
b/mandel_wall.lua
index
7f55cda
..
de698e3
100644
(file)
--- a/
mandel_wall.lua
+++ b/
mandel_wall.lua
@@
-12,28
+12,31
@@
local T = Textures
require "Render"
require "Render"
-
-
local lights = {V.new{1,-1,1}}
local plane_normal = V.normalize(V.new{0.0,-1,0.0})
local texture_y = V.normalize(V.cross(plane_normal,V.x))
local texture_x = V.cross(texture_y,plane_normal)
local lights = {V.new{1,-1,1}}
local plane_normal = V.normalize(V.new{0.0,-1,0.0})
local texture_y = V.normalize(V.cross(plane_normal,V.x))
local texture_x = V.cross(texture_y,plane_normal)
+local inside_pigment = T.make_image_pigment("textures/parquet2.ppm", 1)
+local outside_pigment = T.make_image_pigment("textures/parquet1.ppm", 1)
+
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(
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_image_pigment("images/wood1.ppm",1)
,
-
T.make_image_pigment("images/wood2.ppm",1)
,
- 20),
+
inside_pigment
,
+
outside_pigment
,
+ 100), -- Iterations
texture_x, texture_y),
0.2, 1.0, 0, 1)),
texture_x, texture_y),
0.2, 1.0, 0, 1)),
- camera = {location = V.new{
0
,-5,0},
- point_at = V.new{
0
,0,0},
+ camera = {location = V.new{
-0.5
,-5,0},
+ point_at = V.new{
-0.5
,0,0},
right = V.x,
fov = 1}}
right = V.x,
fov = 1}}
-Render.render(scene, 1280, 960, "mandel_wall.ppm")
+-- Render.render(scene, 320, 200, "mandel_wall.ppm")
+-- Render.render(scene, 1280, 960, "mandel_wall.ppm")
+Render.render(scene, 2560, 1440, "out/mandel_wall.ppm")