diff options
author | Nat Lasseter <user@4574.co.uk> | 2024-06-13 14:38:50 +0100 |
---|---|---|
committer | Nat Lasseter <user@4574.co.uk> | 2024-06-13 14:38:50 +0100 |
commit | 69e0357135a49157ed7a8c2e57c331e960422e15 (patch) | |
tree | 2402ef255cf24afff14ac653826386e615faee8b /rtiaw | |
parent | b976ce98be7275bf92e01f6c86bf2b694530481e (diff) |
Chapter 11
Diffstat (limited to 'rtiaw')
-rwxr-xr-x | rtiaw | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -10,14 +10,16 @@ require 'material' mat_ground = Lambertian.new(0.8, 0.8, 0.0) mat_centre = Lambertian.new(0.1, 0.2, 0.5) -mat_left = Metal.new(0.8, 0.8, 0.8, 0.3) +mat_left = Dielectric.new(1.5) +mat_bubble = Dielectric.new(1 / 1.5) mat_right = Metal.new(0.8, 0.6, 0.2, 1.0) world = Hittables.new -world << Sphere.new(0, -100.5, -1, 100, mat_ground) -world << Sphere.new(0, 0, -1, 0.5, mat_centre) -world << Sphere.new(-1, 0, -1, 0.5, mat_left) -world << Sphere.new(1, 0, -1, 0.5, mat_right) +world << Sphere.new( 0, -100.5, -1, 100, mat_ground) +world << Sphere.new( 0, 0, -1.2, 0.5, mat_centre) +world << Sphere.new(-1, 0, -1, 0.5, mat_left) +world << Sphere.new(-1, 0, -1, 0.4, mat_bubble) +world << Sphere.new( 1, 0, -1, 0.5, mat_right) camera = Camera.new(400, 16.0 / 9) camera.render(world) |