Prettify earth setting

This commit is contained in:
Max Nuding 2022-07-08 16:57:50 +02:00
parent f5f46a7a0b
commit 35643fef39
Signed by: phlaym
GPG Key ID: 0AAD39863E09DC48

View File

@ -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,