diff options
author | Nat Lasseter <user@4574.co.uk> | 2024-06-24 22:12:44 +0100 |
---|---|---|
committer | Nat Lasseter <user@4574.co.uk> | 2024-06-24 22:12:44 +0100 |
commit | d248e30d365d5e401d5cd372aa415fb2f9a39326 (patch) | |
tree | 58c5602ec20ad39ff34640503c7a4d35c4e563cb /rtiaw.go | |
parent | bd3bbdd239fd91056442384bfe3a86b2b8c0e68e (diff) |
Chapter 10
Diffstat (limited to 'rtiaw.go')
-rw-r--r-- | rtiaw.go | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -9,9 +9,16 @@ import ( func main() { start := time.Now(); + mat_ground := Lambertian{Vec3{0.8, 0.8, 0}}; + mat_centre := Lambertian{Vec3{0.1, 0.2, 0.5}}; + mat_left := Metal{Vec3{0.8, 0.8, 0.8}, 0.3}; + mat_right := Metal{Vec3{0.8, 0.6, 0.2}, 1.0}; + var world Hittables; - world.Add(Sphere{Vec3{0, 0 , -1}, 0.5}); - world.Add(Sphere{Vec3{0, -100.5, -1}, 100 }); + world.Add(Sphere{Vec3{ 0, -100.5, -1 }, 100 , mat_ground}); + world.Add(Sphere{Vec3{ 0, 0 , -1.2}, 0.5, mat_centre}); + world.Add(Sphere{Vec3{-1.0, 0 , -1 }, 0.5, mat_left}); + world.Add(Sphere{Vec3{ 1.0, 0 , -1 }, 0.5, mat_right}); cam := NewCamera(400, 16.0/9.0, 100, 50); cam.Render(world); |