Ray Tracing
Notes on Ray Tracing in One Weekend
Table of Contents
- 1. Output An Image
- 2. Vec3 Class
- 3. Rays
- 4. Adding a sphere to the scene
- 5. Antialiasing
- 6. Diffuse Materials
- 7. Metal
- 8. Dielectrics
- 9. Positionable Camera
- 10. Depth of Field (Defocus Blur)
- 11. The Finale
- 12. Multithreading
1. Output An Image
1.1. PPM Image Format
Usually it details some sort of encoding - P3 being colors in ASCII.
Then new line followed by Num Cols space, Num Rows.
The next line is a single number detailing the scale (255 usually denotes max color).
Then R G B space separated values times the number of columns per row.
Then you have Num Rows rows to get you the final image.
Org Style Demo
A custom org css stylesheet to bring it to visual parity with the rest of my website. The org template is borrowed from https://gongzhitaao.org/orgcss/.
Usage & Copyright
If you want to use this stylesheet, feel free to add this line to your .org file:
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://seanzhang.ca/org.css"/>If you discover any bugs, feel free to let me know either directly or through Github.