Lucien RivièreDepth: Y -46
  • /tp HomeGo to
  • /tp ProfileExperience, skills and CVGo to
  • /tp MethodHow I work, layer by layerGo to
  • /tp ContactSay helloGo to
  • /tp ProjectsEverything I built, filterableGo to
  • /tp CollaboratorsEveryone I built withGo to
  • /tp SignalMapA mobile coverage map of Réunion and Mayotte: click anywhere and see the signal you would get from about 3,100 antennas.Projects
  • /tp ZappyA network survival game in three programs: a C++ server, a 3D viewer and AI players, with LLM role-playing agents as a bonus.Projects
  • /tp MaskGeneratorA small neural network that finds the road lines in a camera image, and a 2D raycast that turns them into lidar-like distances to drive a car.Projects
  • /tp CockerA prototype platform to design an app as a graph of services and deploy it on Kubernetes: sandbox to try it, production to expose it.Projects
  • /tp RaytracerA C++ raytracer where everything (shapes, materials, lights, output) is a plugin, sped up with a BVH, with a live preview window.Projects
  • /tp RoboCarA small real car that drives itself around a track: a camera, a lidar-like view of the road lines, and a model that learned from human driving.Projects
  • /tp CVRIETwo machine-learning studies using only scikit-learn: classifying chest X-rays, and grouping patient testimonies into symptom clusters with no labels.Projects
  • /tp MyTeamsA Teams-like chat in Rust: a multi-client server, a command-line client, a text protocol written as an RFC, and data that survives restarts.Projects
  • /tp ArcadeA retro game console in C++ where games and screens are plug-in libraries: swap the game or the graphics (terminal, SDL, SFML) while it runs.Projects
  • /tp Masked DeliveryA game made in a weekend for Global Game Jam 2026: pick the right mask for each caller, then survive the drive, with penalties that stack up.Projects
  • /tp 42shA Unix shell written in C, tcsh-style: pipes, logic operators, globbing, aliases, variables, line editing and history, checked against Bash.Projects
  • /tp CorewarA virtual machine in C where small programs fight inside a shared memory, with my own warrior and a 3D viewer in the bonus.Projects
  • /tp A-DasHboarDA dashboard of widgets from third-party services, built on JustBetterAuth, an authentication library written from scratch.Projects
  • /tp StoneAnalysisA Python tool that finds the notes in a sound file with a hand-written Fourier transform, and hides secret messages inside the audio.Projects
  • /tp PipetoA security audit of a nuclear-reactor console full of planted vulnerabilities: find them, rank them, patch them and prove the fixes with tests.Projects
  • /tp TardisCleaning SNCF train-delay data, training a model to predict delays, and a Streamlit dashboard. The model barely beat guessing, and the page says so.Projects
  • /tp InterStonarThrow a rock into a simulated universe: planets that attract each other and merge, or shapes it hits, found by stepping with signed distances.Projects
  • /tp SensAIA small chat program for a local AI model that talks to it with plain HTTP, and can force its answers into a JSON shape you define.Projects
  • /tp This portfolioThe site you are on: one set of data, six themes. Each theme is a different way to explore the same work, from a familiar page to a game.Projects
  • /tp Portfolio toysSmall interactive toys from this portfolio: Fourier epicycles, a themed crossword and a bot that walks where you click.Projects
  • /tp snake_pyA contribution to Infamous97440's repository: 2 commits from me.Projects
  • /tp MyTopA clone of the Linux top command in C and ncurses: live CPU, memory, swap and per-process usage read from /proc.Projects
  • Switch to CorporateThemes
  • Switch to SpaceThemes
  • Switch to Cocktail PartyThemes
  • Switch to ReelThemes
  • Switch to GroveThemes
  • Search the whole siteActions
  • Download CV (PDF)Actions
  • Copy my email addressActions
  • Turn the home page bot on or offActions
All themes

← Back to the inventory

Chest · Graphics & simulation

Raytracer

A C++ raytracer where everything (shapes, materials, lights, output) is a plugin, sped up with a BVH, with a live preview window.

archived

Period
Apr 2026 – May 2026
Role
BVH, camera maths, live preview and docs
Party
3 people
Status
archived
Last touched
May 2026
On GitHub
0 ★ · last push 2026-05-21

Contents

Demo

The generated documentation of the engine, hosted on GitHub Pages

A raytracer draws a picture the way light works, backwards: it fires a ray through every pixel and follows it around a 3D scene. What does it hit, how is that surface lit, does it reflect? This one was built as a team for Epitech, around one rule: adding something new should never mean changing the engine.

How it works

Everything is a plug-in: shapes, materials, lights, even the way the picture is saved. A scene is a small text file, and adding a new kind of shape means writing one plug-in and naming it in a scene.

To keep big scenes fast, objects are grouped into nested boxes, so a ray that misses a box skips everything inside it. The heat map in the pictures shows it at work. A live window can also show the picture while it is being drawn.

A scene is read from a file like this one, which draws the first picture (download it). Shapes are placed and tilted by their own points and axes; the camera is the one thing that takes a full transform (position, rotation, scale).

camera:
{
    resolution = { width = 1280; height = 720; };
    position = { x = 0.0; y = -95.0; z = 22.0; };
    rotation = { x = 98.0; y = 0.0; z = 0.0; };   # degrees, applied X then Y then Z
    fieldOfView = 60.0;
};

primitives:
{
    cones = (
        # Apex up, axis pointing down: a finite cone standing on the floor
        { apex = { x = 32.0; y = 38.0; z = 24.0; }; axis = { x = 0.0; y = 0.0; z = -1.0; };
          radius = 10.0; height = 24.0; color = { r = 245.0; g = 190.0; b = 60.0; }; material = "lambertian"; }
    );
    # spheres, cylinders and planes follow the same pattern
};

lights:
{
    ambient = { multiplier = 0.25; color = { r = 255.0; g = 255.0; b = 255.0; }; };
    point = (
        { position = { x = -60.0; y = -40.0; z = 90.0; }; color = { r = 255.0; g = 245.0; b = 230.0; }; intensity = 0.8; }
    );
};

The documentation is generated from the code and published automatically, and the repository ships 23 sample scenes, from a billiard table to a rainbow corridor.

What I took from it

  • A clear boundary pays off once everyone respects it: new features arrive as new files instead of edits to the core.
  • The best speed-ups come from not doing work at all, here by skipping whole parts of the scene.

Built with