/raytracer

My own raytracer in one week ⚡

Primary LanguagePythonApache License 2.0Apache-2.0

raytracer

My own raytracer in one week

Requirements: pillow, PyGLM

How to use?

  1. git clone https://github.com/linux-admin0001/raytracer.git
  2. cd raytracer
  3. python -m pip install PyGLM pillow tqdm
  4. python main.py
  5. Enjoy!

Gallery

rendered five_shperes_and_mirror one_shpere_with_ideal_mirror_floor other_shpere rendered rendered rendered

Perfectly polished metal surface (blur ratio: 0)

rendered

Blurred reflections (0 secondary reflected rays to suppress noise, blur ratio: 0.5)

rendered

Blurred reflections (20 secondary reflected rays to suppress noise, blur ratio: 0.5)

rendered

Blurred reflections (20 secondary reflected rays to suppress noise, blur ratio: 0.1)

rendered_

Todo

  • add rotation matrix
  • add blurry reflection
  • add visibultity light sources