tommyjtl / simple-ray-tracer

A very simple Ray Tracer implemented with Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Ray Tracer

A very simple Ray Tracer implemented with Python.

Features

Implemented

  • Handles the input file keywords png, color, sphere, and one sun, with proper handling of sRGB gamma.
  • Implements the ray-sphere intersection algorithm.
  • Implement shadows with shadow rays, including preventing shadow acne.
  • Exposure control

To be implemented

  • Multiple light sources (suns) and shadows
  • Move and rotates the camera
  • Fisheye and panoramic cameras
  • Plane-intersection
  • Triangle-intersection
  • Texture mapping
  • Animation
  • IOR and refraction
  • Anti-aliasing
  • DoF
  • Global illumination
  • BVH

Usage

python main.py <input_file>

# Example
python main.py raytracer-files/ray-sphere.txt

Below is a list of implemented input files. Or run bash batch_test.sh to test all of them.

sphere
sun
color
overlap
behind
shadow-basic
expose1
expose2
suns
shadow-suns

References

About

A very simple Ray Tracer implemented with Python.

License:MIT License


Languages

Language:Python 92.0%Language:Shell 7.3%Language:Makefile 0.7%