Ray Tracing in One Weekend Book Series
====================================================================================================
| ![RT in One Weekend][cover1] | ![RT The Next Week][cover2] | ![RT The Rest of Your Life][cover3] |
|:----------------------------:|:---------------------------:|:-----------------------------------:|
| [In One Weekend][book1] | [The Next Week][book2] | [The Rest of Your Life][book3] |
Getting the Books
------------------
The _Ray Tracing in One Weekend_ series of books are now available to the public for free directly
from the web:
- [Ray Tracing in One Weekend][web1]
- [Ray Tracing: The Next Week][web2]
- [Ray Tracing: The Rest of Your Life][web3]
These books have been formatted for both screen and print. For printed copies, or to create PDF
versions, use the print function in your browser.
Project Status
---------------
We just shipped a tiny release, [v3.2.3][], to get out two quick small fixes. Mostly we're very
heads-down right now working on our major v4 release. Lots of changes. If you'd like to check it
out, we're developing on the `dev-major` branch. We're tackling some larger refactorings to further
simplify the code, address some large outstanding issues, and focus on more development and
expansion of book 3: _Ray Tracing: The Rest of Your Life_.
If you have a change you'd like to contribute,
[please see our contribution guidelines][CONTRIBUTING].
GitHub Discusions
------------------
GitHub just released GitHub Discussions — a new feature to host conversations in a project without
requiring everything to be an issue. This is likely a much better way to post questions, ask for
advice, or just generally talk about the project. Is it useful? Don't know, but [let's give it a
shot!](https://github.com/RayTracing/raytracing.github.io/discussions/).
Directory Structure
-------------------
The organization of this repository is meant to be simple and self-evident at a glance:
### books/
This folder contains the three raytracing books (in HTML), and some supporting material.
### images/
Contains all of the images and figures of the books. Can also be used to compare your results.
### style/
Contains the css for the books and the site.
### src/
Contains the source.
### src/common/
Contains any headers that are common to two or more books. This is also where external headers
are stored.
### src/`<book>`/
Contains the source specific to any one book. Their is no sharing of source outside of the common
directory.
Source Code
-----------
### Intent
This repository is not meant to act as its own tutorial. The source is provided so you can compare
your work when progressing through the book. We strongly recommend reading and following along with
the book to understand the source. Ideally, you'll be developing your own implmentation as you go,
in order to deeply understand how a raytracer works.
### Downloading The Source Code
The [GitHub home][] for this project contains all source and documentation associated with the _Ray
Tracing in One Weekend_ book series. To clone or download the source code, see the green "Clone or
download" button in the upper right of the project home page.
### Programming Language
This book is written in C++, and uses some modern features of C++11. The language and features were
chosen to be broadly understood by the largest collection of programmers. It is not meant to
represent ideal (or optimized) C++ code.
### Implementations in Other Languages
The _Ray Tracing in One Weekend_ series has a long history of implementations in other programming
languages (see [_Implementations in Other Languages_][implementations]), and across different
operating systems. Feel free to add your own implementation to the list!
### Branches
The `master` branch contains the latest released (and live) assets. All ongoing development, with
all of the latest changes, can be found in the `dev-patch`, `dev-minor`, and `dev-major` branches.
We try to keep CHANGELOG.md up to date, so you can easily browse what's new in each development
branch.
Building and Running
---------------------
Copies of source are provided for you to check your work and compare against. If you wish to build
the provided source, this project uses CMake. To build, go to the root of the project directory and
run the following commands to create the debug version of every executable:
$ cmake -B build
$ cmake --build build
You can specify the target with the `--target <program>` option, where the program may be
`inOneWeekend`, `theNextWeek`, `theRestOfYourLife`, or any of the demonstration programs. By default
(with no `--target` option), CMake will build all targets.
On Windows, you can build either `debug` (the default) or `release` (the optimized version). To
specify this, use the `--config <debug|release>` option.
### CMake GUI on Windows
You may choose to use the CMake GUI when building on windows.
1. Open CMake GUI on Windows
2. For "Where is the source code:", set to location of the copied directory. For example,
`C:\Users\Peter\raytracing.github.io`.
3. Add the folder "build" within the location of the copied directory. For example,
`C:\Users\Peter\raytracing.github.io\build`.
4. For "Where to build the binaries", set this to the newly-created build directory.
5. Click "Configure".
6. For "Specify the generator for this project", set this 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.
### Running The Programs
On Linux or OSX, from the terminal, run like this:
$ build/inOneWeekend > image.ppm
On Windows, run like this:
build\debug\inOneWeekend > image.ppm
or, run the optimized version (if you've built with `--config release`):
build\release\inOneWeekend > image.ppm
The generated PPM file can be viewed directly as a regular computer image, if your operating system
supports this image type. If your system doesn't handle PPM files, then you should be able to find
PPM file viewers online. We like [ImageMagick][].
Corrections & Contributions
----------------------------
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.
[book1]: books/RayTracingInOneWeekend.html
[book2]: books/RayTracingTheNextWeek.html
[book3]: books/RayTracingTheRestOfYourLife.html
[CONTRIBUTING]: CONTRIBUTING.md
[cover1]: images/RTOneWeekend-small.jpg
[cover2]: images/RTNextWeek-small.jpg
[cover3]: images/RTRestOfYourLife-small.jpg
[GitHub home]: https://github.com/RayTracing/raytracing.github.io/
[ImageMagick]: https://imagemagick.org/
[implementations]: https://github.com/RayTracing/raytracing.github.io/wiki/Implementations
[v3.2.3]: https://github.com/RayTracing/raytracing.github.io/releases/tag/v3.2.3
[web1]: https://raytracing.github.io/books/RayTracingInOneWeekend.html
[web2]: https://raytracing.github.io/books/RayTracingTheNextWeek.html
[web3]: https://raytracing.github.io/books/RayTracingTheRestOfYourLife.html
没有合适的资源?快使用搜索试试~ 我知道了~
Ray Tracing in One Weekend, Ray Tracing The Next Week,
共151个文件
jpg:57个
png:38个
h:33个
需积分: 3 10 下载量 170 浏览量
2022-04-07
13:56:47
上传
评论
收藏 7.64MB ZIP 举报
温馨提示
Ray Tracing in One Weekend, Ray Tracing The Next Week, Ray Tracing The Rest of Your Life 三本关于射线追踪的资料,简单易懂,容易上手。并附有源程序
资源详情
资源评论
资源推荐
收起资源包目录
Ray Tracing in One Weekend, Ray Tracing The Next Week, (151个子文件)
main.cc 13KB
main.cc 5KB
main.cc 4KB
pi.cc 2KB
cos_density.cc 1KB
cos_cubed.cc 1KB
integrate_x_sq.cc 1KB
sphere_importance.cc 1KB
sphere_plot.cc 1KB
book.css 4KB
website.css 826B
.gitignore 53B
stb_image.h 215KB
stb_image_write.h 25KB
hittable.h 6KB
material.h 6KB
aarect.h 5KB
material.h 5KB
hittable.h 5KB
aarect.h 5KB
vec3.h 5KB
texture.h 4KB
bvh.h 4KB
bvh.h 4KB
sphere.h 4KB
perlin.h 4KB
material.h 3KB
constant_medium.h 3KB
sphere.h 3KB
pdf.h 3KB
moving_sphere.h 3KB
hittable_list.h 3KB
aabb.h 3KB
camera.h 2KB
hittable_list.h 2KB
box.h 2KB
box.h 2KB
sphere.h 2KB
hittable_list.h 2KB
rtweekend.h 2KB
color.h 2KB
onb.h 1KB
ray.h 1KB
hittable.h 1KB
rtw_stb_image.h 399B
RayTracingTheNextWeek.html 139KB
RayTracingInOneWeekend.html 138KB
RayTracingTheRestOfYourLife.html 107KB
index.html 4KB
acknowledgments.md.html 3KB
img-2.22-book2-final.jpg 393KB
img-1.21-book1-final.jpg 303KB
earthmap.jpg 158KB
img-2.04-white-noise.jpg 124KB
img-3.10-cornell-glass-sphere.jpg 114KB
img-3.02-cornell-refactor2.jpg 96KB
fig-1.09-rand-vec.jpg 92KB
img-3.01-cornell-refactor1.jpg 79KB
img-3.06-cornell-cos-pdf.jpg 78KB
img-3.03-cornell-ortho.jpg 78KB
fig-1.01-ppm.jpg 76KB
fig-1.06-normal-sides.jpg 62KB
fig-3.06-rand-pts-sphere.jpg 60KB
fig-2.01-bvol-hierarchy.jpg 48KB
fig-2.08-ray-vol.jpg 47KB
img-2.06-tile-random.jpg 46KB
fig-2.05-ray-rect.jpg 41KB
img-3.09-arbitrary-pdf.jpg 40KB
fig-2.02-2d-aabb.jpg 39KB
fig-3.07-shape-onto-pdf.jpg 39KB
fig-1.03-cam-geom.jpg 38KB
fig-1.18-cam-film-plane.jpg 36KB
fig-1.16-cam-view-up.jpg 35KB
img-3.11-glass-and-light.jpg 35KB
img-3.12-book3-final.jpg 34KB
fig-1.02-lerp.jpg 31KB
img-2.05-white-noise-blurred.jpg 30KB
img-3.04-cornell-sample-light.jpg 29KB
fig-1.15-cam-view-dir.jpg 28KB
img-3.08-cosine-and-light.jpg 28KB
img-3.07-hittable-light.jpg 28KB
img-3.05-cornell-lightdown.jpg 28KB
fig-2.04-ray-slab-interval.jpg 27KB
fig-3.08-sphere-enclosing-cone.jpg 27KB
fig-3.02-jitter.jpg 26KB
RTOneWeekend.jpg 24KB
fig-1.04-ray-sphere.jpg 24KB
RTNextWeek.jpg 24KB
fig-1.17-cam-lens.jpg 23KB
fig-1.08-light-bounce.jpg 22KB
fig-3.05-solid-angle.jpg 21KB
fig-2.07-rot-z.jpg 21KB
RTRestOfYourLife.jpg 21KB
RTOneWeekend-small.jpg 20KB
fig-2.06-ray-box.jpg 19KB
RTNextWeek-small.jpg 19KB
fig-1.11-reflection.jpg 16KB
fig-3.01-circ-square.jpg 16KB
fig-3.03-histogram.jpg 15KB
RTRestOfYourLife-small.jpg 15KB
共 151 条
- 1
- 2
prnc_lzl
- 粉丝: 1
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0