Rotating Cube in terminal

June 21, 2025 ยท View on GitHub

Rotating 3d cube

Rotating Cube in terminal

I have made this rotating cube from scratch, too learn more about C. I have always been fascinated by 3d computer graphics, which I usually do in WebGL and JavaScript. But since I am learning C, I tried to do this.

To run yourself

Make sure you have make and some c compiler and simple run:

make

and then run executable with the width of characters as argument.

./build/draw_cube 40

Note: If you input a large value and the cube does not fit the screen, make sure to resize your terminal.