Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c90b185b8d
22
src/main.rs
22
src/main.rs
@ -257,12 +257,28 @@ fn earth() -> Scene {
|
||||
let earth_material = Arc::new(
|
||||
Material::Lambertian(Lambertian::textured(Arc::new(earth_texture))));
|
||||
world.push(Arc::new(Sphere {
|
||||
center: Point3::new(0.0, 0.0, 0.0),
|
||||
center: Point3::new(0.0, 2.0, 1.0),
|
||||
radius: 2.0,
|
||||
material: earth_material
|
||||
}));
|
||||
|
||||
let look_from = Point3::new(13.0, 2.0, 3.0);
|
||||
let glass = Arc::new(
|
||||
Material::Dielectric(Dielectric::new(1.5)));
|
||||
world.push(Arc::new(Sphere {
|
||||
center: Point3::new(-0.5,1.0, -1.5),
|
||||
radius: 1.0,
|
||||
material: glass
|
||||
}));
|
||||
|
||||
let noise = NoiseTexture { noise: Perlin::new(), scale: 4.0 };
|
||||
let noise_material = Arc::new(Material::Lambertian(Lambertian::textured(Arc::new(noise))));
|
||||
world.push(Arc::new(Sphere {
|
||||
center: Point3::new(0.0, -1000.0, 0.0),
|
||||
radius: 1000.0,
|
||||
material: noise_material
|
||||
}));
|
||||
|
||||
let look_from = Point3::new(10.0, 6.0, 3.0);
|
||||
let look_at = Point3::new(0.0, 0.0, 0.0);
|
||||
let focus_dist = 2.0;
|
||||
|
||||
@ -271,7 +287,7 @@ fn earth() -> Scene {
|
||||
look_at,
|
||||
Vec3::new(0.0, 1.0, 0.0),
|
||||
DEFAULT_ASPECT_RATIO,
|
||||
20.0,
|
||||
40.0,
|
||||
0.0,
|
||||
focus_dist,
|
||||
0.0,
|
||||
|
Loading…
Reference in New Issue
Block a user