The spinning “donuts” has brought some attention recently and was created by the amazing Andy Sloane. No wonder, a flying donut on your terminal? You can find the code below in c. The “pixels” are ASCII characters .,-~:;=!*#$@ that accounts for the illumination value of the surface, but I'll explain step by step below along with the math.
For More Information : https://www.a1k0n.net/2011/07/20/donut-math.html
- Copy the above code into any IDE(Notepad++, Notepad, VS-Code, Sublimetext, Atom, etc)
- Save the file by .C
- Click the Run button
- Or use cmd by this command "gcc donut.c" and then a.exe is created So type "a" and hit enter
- Now enjoy it😃.