commit f62e55bd04e7e924e2e39d2e84f1a9116b918be3 parent c3f3390c8e441ec44a9958758cceafb3137ae8a7 Author: Michael Neuper <michael@michaelneuper.com> Date: Thu, 9 Apr 2026 21:10:07 +0200 create README.md Diffstat:
| A | README.md | | | 36 | ++++++++++++++++++++++++++++++++++++ |
1 file changed, 36 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md @@ -0,0 +1,36 @@ +# cube + +A rotating 3D wireframe cube rendered in the terminal using ncurses. + +Vertices are projected onto the screen with perspective projection and +connected by edges drawn with Bresenham's line algorithm. +The cube spins continuously and can be quit with `q`. + +## Building + +Requires clang and ncurses. + +```sh +make # release build +make debug # debug build with AddressSanitizer and UBSan +make run # build (debug) and run +make clean # remove build artefacts +``` + +## Usage + +```sh +./bin/cube # or make run +``` + +Press `q` to quit. + +## Project structure + +``` +src/ + main.c entry point and render loop + cube.c/h cube state, projection, rotation, and drawing + ncdraw.c/h ncurses drawing primitives (pixel, line) + debug.h assertion macros (active only with -DDEBUG) +```