Add some more objects to the test scene
This commit is contained in:
parent
5a0646aaa2
commit
20d3e9ba8d
16
src/main.rs
16
src/main.rs
|
|
@ -63,17 +63,31 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
Box::new(Plane::new(
|
Box::new(Plane::new(
|
||||||
Vector3::new(0.0, 1.0, 0.0),
|
Vector3::new(0.0, 1.0, 0.0),
|
||||||
-2.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 {
|
Rc::new(LambertianMaterial {
|
||||||
colour: ColourRgbF::from_named(NamedColour::Green),
|
colour: ColourRgbF::from_named(NamedColour::Green),
|
||||||
}),
|
}),
|
||||||
)),
|
)),
|
||||||
Box::new(Sphere::new(
|
Box::new(Sphere::new(
|
||||||
Vector3::new(0.0, 1.0, 5.0),
|
Vector3::new(-1.25, -0.5, 6.0),
|
||||||
1.0,
|
1.0,
|
||||||
Rc::new(LambertianMaterial {
|
Rc::new(LambertianMaterial {
|
||||||
colour: ColourRgbF::from_named(NamedColour::Blue),
|
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);
|
render_scene(&mut output_image, &scene);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue