ASCII Geometry

Donut

donut.bakircinjarevic.com

Technologies

Svelte

Svelte

TypeScript

TypeScript

C++

C++

Math

Math

Features

It's a donut

And it's spinning.

There's also a cube

And it too, is spinning.

Full control of parameters

Adjust size, distance, spacing between dots and so much more in the control panel.

A bit of math

Things like projections, vectors, matrices and trigonometry made this possible.

Description

ASCII Geometry is a project that renders 3D shapes in the terminal using ASCII characters. It features a spinning donut and cube, with customizable parameters for rotation speed, size, and other visual effects.

Joma Tech's video "Why you need math for programming" has inspired me to try and build this myself.

I have read the original paper by Andy Sloane who made this originally, and understood nothing. I came back to this problem a couple of years later, when I matured mathematically, and actually accomplished making the donut myself, but it was slow. Only then I looked at the original code and found optimizations that brought the donut to life.

Full of joy, I implemented the cube from scratch, which was very fun aswell. I stopped there since no more interesting (but easy to model) shapes came to mind at the time (a sphere is boring).