Skip to content
Back to the catalog
Project raytracerGraphicsIntermediateBeta

A ray tracer

Vectors, intersections and materials. Write a PPM and watch a scene appear pixel by pixel.

Build it in your language

The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.

Guide language

The stage guides read in this language. Only languages this project is fully translated into show up here; the interface language does not change.

What this project is about

This is the most visual challenge in the catalog: every stage ends in an image you can open and look at. The payoff is immediate and addictive.

Starting from vectors you write yourself, you'll cast rays through a virtual camera, compute intersections with spheres and planes, and add materials, shadows and reflections until you get a scene that looks like it came out of a serious renderer. Because it did.

Roadmap

9 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.

  1. Phase 12 stages

    An image on screen

    Your own vectors, the PPM format, and a gradient as a first output.

    1. 01Vectors and colours
    2. 02PPM image
  2. Phase 23 stages

    Rays and geometry

    Camera, rays, sphere intersection and normals.

    1. 01Rays and camera
    2. 02Sphere intersection
    3. 03Normals and scene
  3. Phase 32 stages

    Materials

    Diffuse, metals, glass with refraction, and shadows.

    1. 01Diffuse and metal
    2. 02Glass and shadows
  4. Phase 42 stages

    Quality and the final image

    Antialiasing, depth of field, and optimising the inner loop.

    1. 01Antialiasing
    2. 02Depth and performance

Before you start

A ray tracing renderer that writes PPM images: your own vector algebra, a configurable camera, sphere and plane intersection, diffuse, metal and glass materials with refraction, shadows, antialiasing by sampling, and depth of field.

  • vector-search-engine
    Beta

    Build a vector search engine

    Build a vector index with exact search, filters, and a simplified HNSW graph.

    Advanced5 stages~18 hDatabases
    vectoresbusqueda aproximadahnsw+1

    TypeScript · Python · Go