Skip to content

alexs-tern/ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦀 Ray Tracer

License: MIT Rust Version

🌟 Features and Example Renders

Depth of Field
Depth of Field: Simulates camera lens focus and defocus blur.
Motion Blur
Motion Blur: Represents motion of objects moving over time.
Image Textures
Image Textures: Maps images as textures onto shapes in the scene.
Perlin Noise
Perlin Noise: Generates random textures with organic appearance.

Other Features

  • Antialiasing: Smooths out jagged edges by casting multiple rays per pixel.
  • Reflections and Shadows: Simulates the behavior of light by calculating when light bounces off reflective objects or is blocked by an object.
  • Configurable Camera: Allows adjustment of the camera's position, orientation, lens, and field of view to capture various types of shots.
  • Various Materials: Use different materials including shiny metals, diffuse Lambertian surfaces, or glass-like objects that handle light reflection and refraction.

ℹ️ Overview

This is a simple ray tracer written in Rust guided by the implementation of the "Ray Tracing in One Weekend" series by Peter Shirley. I developed an interest in computer graphics early on in my computer science coursework in school, so this project is a way to explore that interest while also learning some Rust along the way! The goal of the ray tracer is to render realistic looking images that imitate the way light interacts with various complex surfaces and textures. Above are example renders that demonstrate what the ray tracer is currently capable of.

✍️ Authors

I am currently a senior studying math and computer science at UChicago, and I am interested in pursuing a career in software engineering and technology more broadly. Feel free to message me via LinkedIn!

⬇️ Installation

Simply clone the repository and load the necessary Rust packages to begin working with the project:

git clone https://github.com/alexmstern/ray-tracer.git
cd ray-tracer
cargo build

🚀 Usage

You can render different scenes by changing the scene variable in main.rs to the corresponding scene in the scenes folder. Play around with the settings to get a sense for how the different variables affect the scene and feel free to create your own scenes! Once you have done that render your image with the following commands:

cargo build
cargo run

About

A simple ray tracer written in Rust 🦀

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages