A ray-tracer written in Rust! This is a project to learn the language and hopefully demonstrate the Rust language in its current state.
I'm loosely following http://thingsiamdoing.com/intro-to-ray-tracing.
The project is hosted on github, built on travis-ci, and listed on rust-ci. Documentation is available at http://rust-ci.org/brookst/rust-trace/doc/rust-trace/.
Rust-Trace uses Cargo to build, run and test. Cargo is installed with the latest Rust nightly, which can be performed as follows:
$ curl https://static.rust-lang.org/rustup.sh | sudo bash
Of course, you may want to download and look at rustup.sh
before executing
someone else's code as root. See
http://doc.rust-lang.org/guide.html#installing-rust
Tests can be run with:
$ cargo test
The main program can be run with:
$ cargo run
This outputs a rendering to ray_trace.png
.
In the scripts/
directory is a pre-commit
hook to run the tests. Also,
link_scripts.sh
symlinks scripts into the .git/hooks
directory for use
by git. Run as:
$ ./scripts/link_scripts.sh