![]() |
![]() |
![]() |
---|---|---|
In One Weekend | The Next Week | The Rest of Your Life |
The Ray Tracing in One Weekend series of books are now available to the public for free directly from the web:
For printed copies, or to create PDF versions, use the print function in your browser. These books have been properly formatted for print versions as well.
The github page for this project contains all source and documentation associated with the Ray Tracing in One Weekend series of books.
A local copy of the project can be created on your machine through git bash:
$ git clone https://github.com/RayTracing/raytracing.github.io
A local copy can also be obtained by pointing a git gui client to the link:
https://github.com/RayTracing/raytracing.github.io
Copies of source are provided for you to check your work and compare against. If you wish to build the provided source, the process uses CMake.
If on Linux or OSX, from the terminal:
$ git clone https://github.com/RayTracing/raytracing.github.io
$ cd raytracing.github.io
$ mkdir build
$ cd build
$ cmake ..
$ make
If on Windows, building is recommended on CMake Gui with Visual Studio:
1. Open CMake Gui on Windows
2. Under "Where is the source code:" set to location of the copied directory
e.g. C:\Users\Peter\raytracing.github.io
3. Add Folder "build" within the location of the copied directory
e.g. C:\Users\Peter\raytracing.github.io\build
4. Under "Where to build the binaries" set to newly created build directory
5. Click "Configure"
6. Under "Specify the generator for this project" set to your version of Visual Studio
7. Click "Done"
8. Click "Configure" again
9. Click "Generate"
10. In File Explorer, navigate to build directory and double-click the newly created .sln project
11. Build in Visual Studio
If the project is succesfully cloned and built, you can then use the native terminal of your operating system to simply print the image to file.
If on Linux or OSX, from the terminal:
$ ./inOneWeekend > weekendOutput.ppm
If on Windows, open the command line, cmd.exe:
C:\Users\Peter\raytracing.github.io\build\inOneWeekend.exe > weekendOutput.ppm
This PPM file can then be viewed as a regular computer image. Most operating systems come natively with a PPM viewer included. If your operating system has difficulty knowing what to do with the output, then PPM file viewers can be easily found online.
If you spot errors, have suggested corrections, or would like to help out with the project, please review the CONTRIBUTING document for the most effective way to proceed.