I went ahead and moved the camera position from (2, 2, 2) to (2, 0, 0), since it made for a more interesting picture, and fills the screen better. I also turned off all lighting for the tests. The images were rendered at 512x512 with only 1 sample per pixel.
| Number of Spheres | Pre-processing Time (sec) | Ray Tracing Time (sec) | Total Time (sec) |
| 10 | 0 | 1 | 1 |
| 100 | 0 | 1 | 1 |
| 1000 | 0 | 2 | 2 |
| 10000 | 0 | 3 | 3 |
| 100000 | 1 | 9 | 10 |
| 1000000 | 9 | 25 | 34 |
10 Spheres Initialization: 0 seconds Trace time: 2 seconds 1.09user 0.02system 0:02.42elapsed 45%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (87major+206minor)pagefaults 0swaps 100 Spheres Initialization: 0 seconds Trace time: 3 seconds 1.39user 0.03system 0:02.88elapsed 49%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (87major+207minor)pagefaults 0swaps 1000 Spheres Initialization: 0 seconds Trace time: 4 seconds 1.83user 0.03system 0:03.76elapsed 49%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (87major+218minor)pagefaults 0swaps 10000 Spheres Initialization: 0 seconds Trace time: 6 seconds 2.96user 0.02system 0:06.13elapsed 48%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (87major+322minor)pagefaults 0swaps 100000 Spheres Initialization: 1 seconds Trace time: 11 seconds 5.90user 0.04system 0:12.22elapsed 48%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (87major+1352minor)pagefaults 0swaps 1000000 Spheres Initialization: 15 seconds Trace time: 26 seconds 19.86user 0.39system 0:40.65elapsed 49%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (225major+11689minor)pagefaults 0swaps 10000000 Spheres malloc failed for 1084 bytes. AIEEEE!!! Command exited with non-zero status 255 32.39user 4.55system 1:27.39elapsed 42%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (25907major+41486minor)pagefaults 26768swaps
This is the image of 1M flat shaded red spheres.
10000 Spheres, but uses 0.3/pow(i+1, 0.333) instead of 0.1/pow(n, 0.333).
Many variable sized phong shaded spheres. This image is frame 27 of a 120 rotation movie I rendered out. Unfortunately, the movie takes up 10M of space, so I was unable to put it here.