https://github.com/keyan/raytracer
3D scene path tracer
https://github.com/keyan/raytracer
Last synced: about 1 year ago
JSON representation
3D scene path tracer
- Host: GitHub
- URL: https://github.com/keyan/raytracer
- Owner: keyan
- License: mit
- Created: 2018-11-19T17:00:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T20:51:30.000Z (over 7 years ago)
- Last Synced: 2025-02-09T00:42:51.775Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# raytracer
Ray tracer, supports rendering diffuse and reflective spheres.

## Overview
Implemented through following [Peter Shirley's great book](https://www.amazon.com/dp/B01B5AODD8). It is now free online too, but I'm linking to the ebook because it is a great resource and you should support him if you can.
That book is helpful, but to really understand the methods being used additional references were required, namely:
- http://www.scratchapixel.com, specifically their [ray tracing introduction](http://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing)
- Andrew Kensler's famous [business card ray tracer analysis](http://eastfarthing.com/blog/2016-01-12-card/)
- And Fabien Sanglard's [analysis of the same code](http://fabiensanglard.net/rayTracing_back_of_business_card/)
- Occasional cross referencing with [Fundamentals of Computer Graphics](https://www.amazon.com/Fundamentals-Computer-Graphics-Peter-Shirley/dp/1568814690), also by Peter Shirley
There is a tendency in graphics code to use lots of magic numbers, single character variable names, and assume understanding of some geometric calculations, so I tried to add lots of comments to explain those sorts of cases.
## Usage
Requires C++11 compatible compiler, running: `make` will generate the example image in this README.