How I built a Ray Tracer in Pure Python

Arun Ravindran (~arocks)




What started as a visually appealing Python project for teaching intermediate Python Programmers, building a ray tracer was an enormous learning experience for the author as well. It began with deciphering the intricate mathematics and physics behind image rendering. Translating them into idiomatic Python took several iterations until the code looked beautiful. Eventually the process of making entertaining video proved to be the most challenging of all.

In this talk, I want to cover my experience of exploring the world of Image Processing armed with nothing other than the Python standard library. I hope to help others who are interested in this domain and change perceptions about Python performance in general. This might also be of interest to content creators who would like to make videos about Python.

Talk outline:

  • Project Motivation
  • Existing Ray Tracer Implementations
  • Challenges in Python
  • Art of Video Presentations
  • Structuring and Scripting
  • Visual Storytelling
  • Tools and Technologies
  • Reaching the Audience
  • Project Post-mortem


Basic knowledge of Python. Basic knowledge of Optics and Linear Algebra would help.

Content URLs:

Code to Pure Python Ray tracer:

Blog Post series about the ray tracer:

Playlist to the video tutorial series:

Speaker Info:

Arun "Rocks" Ravindran is an author and speaker. His talks at Pycon are just an excuse to meet cool people. His book titled "Django Design Patterns and Best Practices, 2nd Edition" tries to solve everyday problems that Django Developers face with cutting edge technology and a healthy dose of humor. He is a developer member of the Django Software Foundation.

Speaker Links:

My blog:

Open source:

Previous Talks:

Section: Game Design and 3D Modelling
Type: Talks
Target Audience: Intermediate
Last Updated: