|
165 | 165 | Opening the output file (in `ToyViewer` on my Mac, but try it in your favorite viewer and Google
|
166 | 166 | “ppm viewer” if your viewer doesn’t support it) shows this result:
|
167 | 167 |
|
168 |
| -  |
| 168 | +  |
169 | 170 |
|
170 | 171 | Hooray! This is the graphics “hello world”. If your image doesn’t look like that, open the output
|
171 | 172 | file in a text editor and see what it looks like. It should start something like this:
|
|
624 | 625 | <div class='together'>
|
625 | 626 | In our case this produces:
|
626 | 627 |
|
627 |
| -  |
| 628 | +  |
629 | 630 |
|
630 | 631 | </div>
|
631 | 632 |
|
|
752 | 753 | <div class='together'>
|
753 | 754 | What we get is this:
|
754 | 755 |
|
755 |
| -  |
| 756 | +  |
756 | 758 |
|
757 | 759 | </div>
|
758 | 760 |
|
|
827 | 829 | <div class='together'>
|
828 | 830 | And that yields this picture:
|
829 | 831 |
|
830 |
| -  |
| 832 | +  |
832 | 834 |
|
833 | 835 | </div>
|
834 | 836 |
|
|
1350 | 1352 | This yields a picture that is really just a visualization of where the spheres are along with their
|
1351 | 1353 | surface normal. This is often a great way to look at your model for flaws and characteristics.
|
1352 | 1354 |
|
1353 |
| -  |
| 1355 | +  |
1355 | 1357 |
|
1356 | 1358 |
|
1357 | 1359 | An Interval Class
|
|
1860 | 1862 | <div class='together'>
|
1861 | 1863 | Zooming into the image that is produced, we can see the difference in edge pixels.
|
1862 | 1864 |
|
1863 |
| -  |
| 1865 | +  |
1865 | 1867 |
|
1866 | 1868 | </div>
|
1867 | 1869 |
|
|
2024 | 2026 | <div class='together'>
|
2025 | 2027 | ... Indeed we do get rather nice gray spheres:
|
2026 | 2028 |
|
2027 |
| -  |
| 2029 | +  |
2029 | 2031 |
|
2030 | 2032 | </div>
|
2031 | 2033 |
|
|
2121 | 2123 | <div class='together'>
|
2122 | 2124 | For this very simple scene we should get basically the same result:
|
2123 | 2125 |
|
2124 |
| -  |
| 2126 | +  |
2125 | 2128 |
|
2126 | 2129 | </div>
|
2127 | 2130 |
|
|
2183 | 2186 | <div class='together'>
|
2184 | 2187 | This yields light grey, which is more accurate:
|
2185 | 2188 |
|
2186 |
| -  |
| 2189 | +  |
2188 | 2191 |
|
2189 | 2192 | </div>
|
2190 | 2193 |
|
|
2299 | 2302 | <div class='together'>
|
2300 | 2303 | After rendering we get a similar image:
|
2301 | 2304 |
|
2302 |
| -  |
| 2305 | +  |
2304 | 2307 |
|
2305 | 2308 | </div>
|
2306 | 2309 |
|
|
2649 | 2652 | <div class='together'>
|
2650 | 2653 | Which gives:
|
2651 | 2654 |
|
2652 |
| -  |
| 2655 | +  |
2653 | 2657 |
|
2654 | 2658 | </div>
|
2655 | 2659 |
|
|
2712 | 2716 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2713 | 2717 | [Listing [metal-fuzz-spheres]: <kbd>[main.cc]</kbd> Metal spheres with fuzziness]
|
2714 | 2718 |
|
2715 |
| -  |
| 2719 | +  |
2716 | 2721 |
|
2717 | 2722 | </div>
|
2718 | 2723 |
|
|
2731 | 2736 | there is a refraction ray at all. For this project, I tried to put two glass balls in our scene, and
|
2732 | 2737 | I got this (I have not told you how to do this right or wrong yet, but soon!):
|
2733 | 2738 |
|
2734 |
| -  |
| 2739 | +  |
2735 | 2741 |
|
2736 | 2742 | Is that right? Glass balls look odd in real life. But no, it isn’t right. The world should be
|
2737 | 2743 | flipped upside down and no weird black stuff. I just printed out the ray straight through the middle
|
|
2843 | 2849 | <div class='together'>
|
2844 | 2850 | This gives us the following result:
|
2845 | 2851 |
|
2846 |
| -  |
| 2852 | +  |
2848 | 2854 |
|
2849 | 2855 | </div>
|
2850 | 2856 |
|
|
2964 | 2970 | <div class='together'>
|
2965 | 2971 | We get:
|
2966 | 2972 |
|
2967 |
| -  |
| 2973 | +  |
2969 | 2975 |
|
2970 | 2976 | </div>
|
2971 | 2977 |
|
|
3044 | 3050 | <div class='together'>
|
3045 | 3051 | This gives:
|
3046 | 3052 |
|
3047 |
| -  |
| 3053 | +  |
3048 | 3055 |
|
3049 | 3056 | </div>
|
3050 | 3057 |
|
|
3147 | 3154 | <div class='together'>
|
3148 | 3155 | This gives us the rendering:
|
3149 | 3156 |
|
3150 |
| -  |
| 3157 | +  |
3151 | 3159 |
|
3152 | 3160 | </div>
|
3153 | 3161 |
|
|
3261 | 3269 | <div class='together'>
|
3262 | 3270 | to get:
|
3263 | 3271 |
|
3264 |
| -  |
| 3272 | +  |
3265 | 3274 |
|
3266 | 3275 | </div>
|
3267 | 3276 |
|
|
3278 | 3287 | <div class='together'>
|
3279 | 3288 | to get:
|
3280 | 3289 |
|
3281 |
| -  |
| 3290 | +  |
3282 | 3291 |
|
3283 | 3292 | </div>
|
3284 | 3293 |
|
|
3451 | 3460 | <div class='together'>
|
3452 | 3461 | We get:
|
3453 | 3462 |
|
3454 |
| -  |
| 3463 | +  |
3455 | 3465 |
|
3456 | 3466 | </div>
|
3457 | 3467 |
|
|
3536 | 3546 | <div class='together'>
|
3537 | 3547 | This gives:
|
3538 | 3548 |
|
3539 |
| -  |
| 3549 | +  |
3540 | 3550 |
|
3541 | 3551 | </div>
|
3542 | 3552 |
|
|
0 commit comments