Skip to content

pixelogik/Photon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

photon

This is Photon

My little raytracer, written in Rust, was created to gain first experience with Rust. It was fun 🤖

My learning purpose is done with this project so further improvements that are obviously missing, will not be done.

How to build

cargo build

How to render

The output image is being written in the text format PPM to the standard output stream. The geometry, light and raytracing parameters are in the code in various files.

cargo run > image.ppm

Output

You can easily change the geometry (as long as you want spheres or planes) and the light configuration in main.rs as well as raytracing parameters like

  • number of rays per pixel (monte carlo sampling, average value is taken)
  • number of rays for each global illumination computation on a surface hit point
  • resolution of output image

This is what it renders with the current configuration:

output

About

A primitive raytracer in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages