Skip to content

Ray Tracer Workshop

You'll run a one-day session where three people who've never written a renderer each leave with a shaded sphere they wrote themselves.

About

Teaching a ray tracer is the test of whether you understand your own. You need three people, one day, a whiteboard, and a goal of one shaded sphere each by the end. You'll find out which part you explain badly (it's usually the camera, or why the quadratic has two roots) and you'll debug someone else's code in a language you may not use. A living room, a library meeting room or a corner of an office all work, and the only cost is coffee. The badge needs people who've never done this before, so friends who already write shaders don't count.

At a glance

Per requirement
35 XP
Completion bonus
300 XP
Requirements
6
Takes
A week to plan, one day to run
Skill level
Intermediate (months of practice)
Cost
Cheap (under $10)
Supplies
You need some
Where
Around town
Other people
With other people
Locked for now
Earn two more Uncommon badges in Graphics Programming to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Write a one-page plan with the five steps of the day and the time for each. The steps are something like pixels to a file, a ray through a pixel, hitting a sphere, normals and a light. Put a time next to each step and a note on what tends to go wrong. Take a photo of the plan. Photo
  2. 2
    Build a starter kit that runs and writes a blank image in three languages. People bring their own language, so have a skeleton ready in Python, JavaScript and one compiled language. Take a screenshot of all three writing a blank PPM. Photo
  3. 3
    Explain the ray-sphere intersection on a whiteboard, by hand. Go from the ray equation and the sphere equation to the quadratic, with no slides. Take a photo of the finished board. Photo
  4. 4
    Run the day with at least three beginners. Take a photo of the room with people at their laptops, and add a line on who they are and how you found them. Photo
  5. 5
    Get all three to a shaded sphere they wrote. Post a grid of their three images, each with the author's first name. If someone didn't get there, say where they got stuck and what you'd change. Photo
  6. 6
    Ask each one what was hardest and write down what you'd teach differently. Three answers of a line each is enough. Take a photo of the notes. Photo