Home

All projects

Mar 2026 · Personal project

Vibe-coded Torus

donut.c draws a spinning 3D torus with nothing but text characters. I rebuilt it in Rust with Claude Code.

I wrote the math down first, then had every step covered by tests. The version below is a port that runs in your browser.

What I did

  • Samples points on the torus, rotates them, projects them and shades each one with 12 characters.
  • The math lives in its own spec, and tests cover projection, light and rendering.
  • Runs anywhere with one Docker command.

Try it

The torus, drawn with twelve characters and turning in place.

Designed and built by Eduardo Aire Torres (opens in a new tab) with Next.js (opens in a new tab), React (opens in a new tab), TypeScript (opens in a new tab), Sass (opens in a new tab) and three.js (opens in a new tab), and hosted on Vercel (opens in a new tab). Recent updates were made with help from Claude Code (opens in a new tab) and Cursor (opens in a new tab). Set in Degular (opens in a new tab) by James Edmondson (OH no Type Co. (opens in a new tab)).