Other Ray Tracing in One Weekend repos:
- https://github.com/gau-nernst/ray-tracing-c (finished Book 2)
- https://github.com/gau-nernst/ray-tracing-numba
cargo run --release
The main purpose of this project is for me to learn Rust. Some lessons:
-
This approach is not so wise. I need to learn Rust and ray-tracing at the same time. Apart from the mathetics, the design aspect of a ray-tracing codebase is also something I'm not familiar with. Therefore, I could not focus solely on learning Rust. Perhaps I should implement something that I know well (e.g. Word2Vec that I previously implemented with Numba) instead.
-
Rust is known for its safety, not for its ease of use for computation. If I want to focus on writing code for fast computation, perhaps other languages that are specifically designed for the purpose are better suited, such as Julia.
-
It's easy to write slow code for Rust. I had an old ray-tracing implementation in Numba (I probably should update it, should be interesting). I have a feeling the Numba version is faster than my Rust version. Theorectically Rust can be fast, but I don't know it well enough to optimize it.