Add a proper description to the README.md and include it in lib.rs

This commit is contained in:
Matthew Gordon 2020-04-23 21:42:32 -04:00
parent 1b66995bdd
commit 2a77bac0cc
2 changed files with 21 additions and 4 deletions

View File

@ -1,7 +1,21 @@
![](https://github.com/matthewscottgordon/vanrijn/workflows/Rust/badge.svg) ![](https://github.com/matthewscottgordon/vanrijn/workflows/Rust/badge.svg)
# vanrijn # Vanrijn
Ray tracer
![Rendered test image of three spheres](.github/output.png?raw=true "Test Image") Vanrijn is a [physically based](https://en.wikipedia.org/wiki/Physically_based_rendering)
![Rendered test image of three spheres and a bunny](.github/output2.png?raw=true "Test Image") [ray tracer](https://en.wikipedia.org/wiki/Ray_tracing_(graphics)). Many thanks to the
authors of the book
["Physically Based Rendering: From Theory to Implementation](https://www.pbrt.org/) from
which many of the algorithms used here are taken. This is, however _not_ a Rust port of
the C++ PBRT rederer described in that book.
This crate is structured as a library; main.rs is just a glorified test harness which
shows an example of using the library to render a scene. It uses SDL2 to display the
rendered image.
On Ubuntu 19.04, if you have the libsdl2-dev package installed you should be able to
run "cargo run" and see a window with a test scene rendered into it. In theory it should
work on any platform with SDL2 installed but I've only tested it on Ubuntu Linux.
![](.github/output.png?raw=true "Test Image 1")
![](.github/output2.png?raw=true "Test Image")

View File

@ -1,3 +1,6 @@
#![feature(external_doc)]
#![doc(include = "../README.md")]
pub mod camera; pub mod camera;
pub mod colour; pub mod colour;
pub mod image; pub mod image;