Skip to content

princemuel/raytracer

Ray Tracer Challenge

CI Status

A ray tracer project implemented in Rust. It is inspired by The Ray Tracer Challenge by Jamis Buck. The book provides pseudocode and test cases; the implementation is left to the reader.

Table of Contents

Overview

This project serves two purposes:

  • Showcase: to demonstrate my progress in building a ray tracer step by step.
  • Learning Log: to capture insights about Rust, graphics programming, and math along the way.

What is Ray Tracing?

Ray tracing is a rendering technique that simulates how light interacts with objects and materials to produce highly realistic images.
It’s powerful for accuracy but computationally expensive.

🔗 Ray Tracing on Wikipedia

Features

  • Chapter 01: ???

How to run this project

cargo run --release

Screenshots

Roadmap

  • Basic ray–sphere renderer
  • Shadows & multiple light sources
  • Reflections & refractions
  • Additional primitives: planes, cubes, cylinders, cones etc
  • Patterned materials (stripes, gradients, checkers, perturbed textures)
  • Complex scenes with multiple objects and light sources
  • Performance optimizations (bounding volume hierarchy, parallelism, SIMD?)
  • Full test coverage with language-agnostic examples from the book
  • Comprehensive Rust documentation (cargo doc with examples)
  • Project restructuring to target WebAssembly
  • Build a web app frontend to generate 3D images interactively
  • Publish online demo with examples and benchmarks

Learning Notes

Things I’ve learned while working on this project:

  • Rust’s ownership model pushed me toward cleaner data flow between rays, geometry, and scenes.
  • Writing matrix math from scratch clarified transformations and coordinate systems.
  • Debugging intersections required intermediate visualizations (like surface normals).
  • Translating pseudocode into idiomatic Rust often meant rethinking data structures.

Resources

Author

About

A ray tracer project in Rust

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors