Skip to content
numorbPublic

About

Raytracer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

75 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

miniRT

A raytracer written in C from scratch with MiniLibX. Built at 42 Berlin as part of the Common Core .

Give it a scene file describing a camera, lights and objects — it renders the 3D scene, with lighting and shadows, one ray at a time.

What it does

  • Parses and validates .rt scene files: ambient light, camera (position, orientation, FOV), light sources, and objects — spheres, planes, cylinders
  • Casts a ray per pixel and solves the ray–object intersection equations analytically
  • Lighting: ambient + diffuse (Lambertian) shading and hard shadows via secondary rays toward each light
  • Correct handling of camera orientation and object transformations (position, rotation, scale where applicable)
  • Clean window management and exit, no leaks

What it demonstrates

3D vector math implemented by hand (dot/cross products, normalization, quadratic intersection solving), a rendering pipeline from scene description to pixels, and performance-conscious C — no graphics engine, no math library beyond libm.

Build & run

make
./miniRT scenes/[scene].rt

About

Raytracer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages