cleanup
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -159,15 +159,15 @@ fn three_balls_scene(aspect_ratio: f64) -> (Camera, HittableList) {
|
|||||||
let lookfrom = Point3::new(-2.0, 2.0, 1.0);
|
let lookfrom = Point3::new(-2.0, 2.0, 1.0);
|
||||||
let lookat = Point3::new(0.0, 0.0, -1.0);
|
let lookat = Point3::new(0.0, 0.0, -1.0);
|
||||||
let vup = Vec3::new(0.0, 1.0, 0.0);
|
let vup = Vec3::new(0.0, 1.0, 0.0);
|
||||||
let dist_to_focus = 10.0; //(lookfrom - lookat).length_squared();
|
let dist_to_focus = (lookfrom - lookat).length();
|
||||||
let vfov = 20.0;
|
let focal_length_mm = 20.0;
|
||||||
let defocus_angle = 0.0;
|
let defocus_angle = 0.0;
|
||||||
|
|
||||||
let cam = Camera::new(
|
let cam = Camera::new(
|
||||||
lookfrom,
|
lookfrom,
|
||||||
lookat,
|
lookat,
|
||||||
vup,
|
vup,
|
||||||
vfov,
|
focal_length_mm,
|
||||||
aspect_ratio,
|
aspect_ratio,
|
||||||
defocus_angle,
|
defocus_angle,
|
||||||
dist_to_focus,
|
dist_to_focus,
|
||||||
@@ -184,7 +184,6 @@ fn main() {
|
|||||||
let samples_per_pixel: i32 = 200;
|
let samples_per_pixel: i32 = 200;
|
||||||
let max_depth: i32 = 10;
|
let max_depth: i32 = 10;
|
||||||
|
|
||||||
// Camera and World
|
|
||||||
let (cam, world) = random_scene(aspect_ratio);
|
let (cam, world) = random_scene(aspect_ratio);
|
||||||
|
|
||||||
let num_threads: usize = match available_parallelism() {
|
let num_threads: usize = match available_parallelism() {
|
||||||
@@ -239,6 +238,3 @@ fn main() {
|
|||||||
|
|
||||||
img_buffer.save("render.png").unwrap();
|
img_buffer.save("render.png").unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
// print!("\r{} %", progress);
|
|
||||||
// let _ = stdout().flush();
|
|
||||||
|
|||||||
Reference in New Issue
Block a user