This Rust project is a implementation of the "Raytracing in One Weekend" tutorial by Peter Shirley. The tutorial serves as a foundational resource for understanding the principles of ray tracing. You can find the tutorial here.
The project aims to implement a basic ray tracer in Rust, following the principles outlined in the tutorial. It serves as an educational endeavor to grasp the fundamentals of ray tracing and gain proficiency in Rust programming.
- Basic ray tracing principles as per "Raytracing in One Weekend."
- Utilizes Rust programming language for implementation.
This project serves as a practical exercise to achieve the following learning objectives:
- Rust Proficiency: Strengthen Rust programming skills through the implementation of a ray tracer.
- Unit Tests: Develop and apply unit tests to ensure the correctness of individual components.
- Integration Tests: Implement integration tests to verify the functionality of the complete ray tracing system.
- GitHub Actions: Utilize GitHub Actions for continuous integration to automate testing processes.
- Rust Documentation: Comment modules, structs and functions using Rust Docstrings for automatic API documentation.
To generate an image using the ray tracer, run the example application:
cd examples/balls
cargo run > image.ppm
This will produce the output image based on the implemented ray tracing algorithm.
Unit and integration tests are available to ensure the correctness and reliability of the ray tracer. Run the tests using:
cargo test
To generate documentation for this project, you can use cargo doc
. Make sure you have Rust and Cargo installed. Run the following command in the project directory:
cargo doc --open
The --open
flag opens the documentation in your default web browser after the generation is complete.
After running the cargo doc command, you can navigate to the target/doc
directory and open the index.html
file in your browser. Alternatively, the --open
flag will automatically open the documentation for you.
GitHub Actions is set up to automate the testing process on every push. Check the workflow status in the Actions tab on GitHub.
Contributions are welcome! Feel free to open issues, propose features, or submit pull requests to enhance the project.
This project is licensed under the MIT License - see the LICENSE file for details.