Bresenham lines
Draw a straight line on a grid with whole numbers only, trace the error term pixel by pixel, race it against floats, and fan a starburst.
Open it in the simulatorWrite every pixel yourself in C++ on an ESP32-C3: framebuffers, lines, circles, matrices, perspective and wireframes, ending with a spinning space station.
0 of 7 done
7 lessons in 4 chapters, about 6 hours on a simulated ESP32-C3-DevKitM-1. Free, in your browser, every step checked by the simulator.
Draw a straight line on a grid with whole numbers only, trace the error term pixel by pixel, race it against floats, and fan a starburst.
Open it in the simulatorTurn, move and scale a satellite outline with 2D matrices, prove that the order of transforms matters, and spin it on the screen.
Open it in the simulatorTurn, project, clear, draw, flush: spin a wireframe cube at 26 frames a second, profile every frame, and swap the model for your own.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
A picture in RAM, and the whole-number line every renderer still uses.
Hold a picture in RAM, one byte a pixel, draw a starfield and a planet into it, count and checksum it, and send it to the screen in one go.
0 of 5 steps
Draw a straight line on a grid with whole numbers only, trace the error term pixel by pixel, race it against floats, and fan a starburst.
0 of 5 steps
Circles, fills and the matrices that turn, move and scale anything.
Draw a circle with the midpoint rule and eight-way symmetry, fill a disc from spans, and flood a crater floor with a ring-buffer queue.
0 of 5 steps
Turn, move and scale a satellite outline with 2D matrices, prove that the order of transforms matters, and spin it on the screen.
0 of 4 steps
Divide by depth, then spin a wireframe and profile every frame.
Divide by depth: project a cube's eight corners onto the screen by hand, then move the camera and change its lens and watch perspective change.
0 of 4 steps
Turn, project, clear, draw, flush: spin a wireframe cube at 26 frames a second, profile every frame, and swap the model for your own.
0 of 5 steps
A space station built in code and flown from the game pad.
A wireframe space station built in code (hub, ring, spokes and solar panels), spun and tilted from the game pad, with depth shading on the far side.
0 of 5 steps
All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.
Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 7 lessons of Computer graphics from scratch are free and run in your browser, with nothing to install and no parts to buy before you start.
No. Every lesson runs on a simulated ESP32-C3-DevKitM-1 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.
About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.
Each chapter ends in a project that puts it together: Bresenham lines, Transforms and Wireframes.
With "Framebuffers", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.