Skip to content

NiangOos/rt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 Ray Tracing: Bringing 3D Scenes to Life! 🌈

Overview

Welcome to the Ray Tracing Project! In this project, you'll dive into the fascinating world of computer graphics, creating stunning images by simulating the way light interacts with objects. Forget about simple rasterization; it's time to explore the magic of ray tracing, where each pixel tells a story of light, shadow, and color.

Project Structure

└── src
    ├── camera
    │   ├── camera.rs
    │   └── mod.rs
    ├── cli.rs
    ├── main.rs
    ├── math
    │   ├── mod.rs
    │   └── vec3.rs
    ├── objects
    │   ├── cube.rs
    │   ├── cylinder.rs
    │   ├── hittable.rs
    │   ├── light.rs
    │   ├── materials.rs
    │   ├── mod.rs
    │   ├── plane.rs
    │   ├── scene.rs
    │   └── sphere.rs
    ├── ray
    │   ├── mod.rs
    │   └── ray.rs
    ├── render.rs
    └── utils
        ├── mod.rs
        └── random.rs

🎯 Objectives

By the end of this project, we will:

  1. Implement a ray tracer to render 3D scenes into 2D images.
  2. Create and manipulate basic geometric objects: spheres, cubes, flat planes, and cylinders.
  3. Change object locations and view scenes from different camera angles.
  4. Implement light management to include brightness and shadows.

📸 What is Ray Tracing?

Ray tracing simulates the way rays of light travel and interact with objects in a scene. Imagine a camera capturing an image, where rays originate from the camera, bounce off objects, and reach light sources. Each ray determines the color, shadow, reflection, and refraction of its corresponding pixel.

🔧 Features

Our ray tracer supports:

  • Objects: Sphere, Cube, Flat Plane, Cylinder
  • Transformations: Change object locations and view angles
  • Lighting: Adjust brightness and shadows
  • Resolution: Default output at 800x600 pixels (adjustable for testing)

🖼️ Required Images

We will create four .ppm images demonstrating different scenes:

  1. A scene with a sphere.
  2. A scene with a flat plane and a cube with lower brightness.
  3. A scene with a cube, sphere, cylinder, and flat plane.
  4. The same as above but from a different camera angle.

🚀 Getting Started

Clone the Repository

    https://learn.zone01dakar.sn/git/mamoundiaye/rt.git
    cd rt

Run the Ray Tracer

cargo run > output.ppm

🎨 Running

cargo run > output.ppm

When you launch the program you'll be asked the scene you want to render (the default scenes asked on the audit.) alt text

🏅 Authors

Dive into the world of ray tracing and watch your creations come to life! 🌟✨

About

Migration of rt from Zone01 Dakar Gitea

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages