Skip to content
Back to the catalog
Project raytracerGraphicsIntermediateComing soon

Build your own ray tracer

Build a ray tracer from scratch. Calculate vectors, intersections and materials, then write a PPM image to render a scene 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

Project in preparation: we are completing and verifying the implementation path and its tests. The capabilities below describe the project goal; starting the project is not enabled yet.

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.

  2. Phase 23 stages

    Rays and geometry

    Camera, rays, sphere intersection and normals.

  3. Phase 32 stages

    Materials

    Diffuse, metals, glass with refraction, and shadows.

  4. Phase 42 stages

    Quality and the final image

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

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
    Coming soon

    Build your own vector search engine

    Build a vector search engine from scratch. Create a vector index with exact search, filters and a simplified HNSW graph for approximate search.

    Advanced5 stages~18 hDatabases
    vectorsapproximate searchHNSW+1

    TypeScript · Python · Go