Running The Beautiful C Program That Creates a 3D Rotating Donut | Inspiring Code

Running The Beautiful C Program That Creates a 3D Rotating Donut | Inspiring Code






Hi, so I came across this beautiful C program which creates a rotating 3D donut which I found pretty fascinating and it's code is written by Andi Solan who is a Software engineer and has worked at Google , Spotify and many more which I came to know about from his site .

The MA-th-GIC behind it :

So, basically what these program does is , it plots the ASCII character on the pixels and it's based upon the math of 3D rendering objects and if you are into math and want to check out how does this thing work mathematically then you can go to this awesome blog post written by Andy himself explaining the math behind it .

Steps to Run the C Code :

Maybe you may face some error like the donut just endlessly keeps on printing when you run or something else but don't worry I got you covered .

So as I was trying to run the code and had to spend some time with Google to make this work perfectly because in some IDEs it is working and in some its not so here I am sharing the awesome code and how and where to make it run perfectly .


So, to see the rotating 3D donut on your screen :

1. Copy the above code onto this Online IDE.
2. Set the language to C maybe on the top right corner.
3. Click the Run button and enjoy the scene. 

I was just pretty excited about this and thought to share it with you all and maybe it inspires everyone to create something great .

Would love to know your thoughts . Do comment !! 😃🎉