A Nim port of the source in Peter Shirley's Ray Tracing books; official repo here:
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
book1
book2
book3
renders
.gitignore
README.md

README.md

Peter Shirley's Ray Tracing Minibooks in Nim

This repo is a source port of Peter Shirley's Ray Tracing Minibooks from C++ over to the Nim language. Nim v0.15.x was used. Read a blog post about this repo here: https://16bpp.net/blog/post/ray-tracing-book-series-review-nim-first-impressions

The official repo page can be found on GitLab: https://gitlab.com/define-private-public/PeterShirley-RayTracing-Nim If you have any issues with the source code, please report issues there. Any other places that host this code should be treated as mirrors.

To build the Ray Tracers in each book, there is a nakefile.nim defined, so you will need the nake utility. For best performance, I recommend running nake release. The default build task is debug.

I've tried to keep the source code as simple as possible, so it probably isn't as optimized as it could be. I've also tried to keep it as close as possible to the original source (e.g. naming conventions and structure), but a few times I've taken liberties for the sake simplicity (e.g. see book1/vec3.nim). Be sure to check each directory's notes.txt file.

Please also keep in mind that I worked on these when I was still very new to the Nim language (and it's ecosystem). So it's very likely there are inefficiencies, not so great code consistancy, and other undesireables.

Ray Tracing in One Weekend

Ray Tracing in One Weekend

Amazon link -- Original C++ Repo

Ray Tracing: the Next Week

Ray Tracing: the Next Week

Amazon link -- Original C++ Repo

Ray Tracing: The Rest Of Your Life

Ray Tracing: The Rest Of Your Life

Amazon link -- Original C++ Repo