Add some more objects to the test scene

This commit is contained in:
Matthew Gordon 2019-11-25 08:34:04 -05:00
parent 5a0646aaa2
commit 20d3e9ba8d
1 changed files with 15 additions and 1 deletions

View File

@ -63,17 +63,31 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
Box::new(Plane::new(
Vector3::new(0.0, 1.0, 0.0),
-2.0,
Rc::new(LambertianMaterial {
colour: ColourRgbF::new(0.55, 0.27, 0.04),
}),
)),
Box::new(Sphere::new(
Vector3::new(1.25, -0.5, 6.0),
1.0,
Rc::new(LambertianMaterial {
colour: ColourRgbF::from_named(NamedColour::Green),
}),
)),
Box::new(Sphere::new(
Vector3::new(0.0, 1.0, 5.0),
Vector3::new(-1.25, -0.5, 6.0),
1.0,
Rc::new(LambertianMaterial {
colour: ColourRgbF::from_named(NamedColour::Blue),
}),
)),
Box::new(Sphere::new(
Vector3::new(0.0, 1.5, 6.0),
1.0,
Rc::new(LambertianMaterial {
colour: ColourRgbF::from_named(NamedColour::Red),
}),
)),
],
};
render_scene(&mut output_image, &scene);