From 1a00ca37996c15b4575b617e4a4e7d674e66e57e Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 12 Apr 2022 13:20:00 +0800 Subject: Add the earth. (now we've found a bug) --- main_simple_scanner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp index 709914b..9b578d2 100644 --- a/main_simple_scanner.cpp +++ b/main_simple_scanner.cpp @@ -145,6 +145,9 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport double sphere_z, double sphere_r) { double r = 1.0 * image_width / image_height; viewport vp{viewport_width, viewport_width / r, vec3d{0, 0, -focal_length}}; + vp.add_object(std::unique_ptr{new sphere{ + vec3d{0, -100.5, -1}, + 100}}); // the earth vp.add_object(std::unique_ptr{new sphere{vec3d{0, 0, sphere_z}, sphere_r}}); timer tm; tm.start_measure(); -- cgit v1.2.3