Skip to content

Raytracer 🎯💡

Welcome to Raytracer — the artful engine that brings math, light, and imagination together to render worlds one pixel at a time. Whether you're lighting up spheres, tiling infinite planes, or just flexing those vector muscles, this project traces your brilliance back to the source.

It's not a 3D modeling suite… it's pure unfiltered rays. Think "Toy Story if it had to be written in C and rendered on a college budget."


Supported Object Types 🧱

This raytracer doesn't just bounce light—it interacts with:

  • Infinite and finite planes
  • Spheres (including procedural variants)
  • Tiled surfaces
  • Custom procedural shaders

Each shape supports ambient, diffuse, and specular reflection properties, letting you tune your scenes with fine-grained light behavior.


Lighting It Up 🔦

Three kinds of lighting effects are in play:

  • Ambient light — the soft, background glow that kisses every pixel.
  • Diffuse reflection — for those matte surfaces that scatter light in all directions.
  • Specular reflection — the mirror-shine that reflects like it means it.

Together, they let you go from flat to fabulous.


Scene Crafting 🛠️

Scenes are defined with precise control over world dimensions, camera viewpoint, and objects. Each entity has a code—like 13 for Sphere or 15 for Finite Plane—letting you sculpt your scene file like a poet with a punchcard.

Need examples? Peek inside the input folder in the GitHub repo. Or browse model.h for the full cast of object codes.


GitHub Repo 📦

This project lives in the open: 👉 View raytracer on GitHub

Explore the code, open an issue, or trace some light of your own. 🌟