C++C++11C++14C++17Language FeatureLearn C++

ASCII Art: Fun Code Spinning Donut In 3D Text Form In C++

There is no word to say, we would like to share this Amazing 3D Spinning Donut by Andy Sloane . This full post explains what is mathematic behind this. Please visit his awesome post here. There is also another video of his codes by Professor Lex Fridman here.

We just made few changes on codes for the C++ Builder Console VCL Application, it runs well as in original.

To apply this awesome code;
1. Create a new C++ Builder Console Application. Choice VCL Framework, and modify lines as below;

2. Hit F9. You will see that donut rotates in 3D form in console as below. You will see blend of mathematics and art of programming.

This procedure is running well on C++ Builder Console Application with FireMonkey Framework too;
To do this code on C++ Builder FMX Project;
1. Create a new C++ Builder Console Application. Choice FMX Framework, and modify lines as same like above;
2. Hit F9. You will see that donut rotates in 3D form in console as below. You will se blend of mathematics and art of programming.

It is also possible to run this code on Visual VCL or FMX applications, it may require some more changes in its procedure to show on Memo. In C++ Builder it is also possible to draw texts or shapes on a bitmap image which may make it much more smooth.

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial

Free C++Builder Community Edition

About author

Dr. Yilmaz Yoru has 35+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He graduated and received his MSc and PhD degrees from the Department of Mechanical Engineering of Eskisehir Osmangazi University. He is the founder and CEO of ESENJA LLC Company. His interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.
Related posts
C++C++11C++14C++17Learn C++SyntaxTemplates

What Are The Logical Operation Metafunctions In Modern C++?

C++C++14C++17C++20Learn C++

What Are The Deprecated C++14 Features In C++17?

C++C++14C++17C++20Learn C++

What Are The C++14 Features Removed From C++17?

C++C++11C++14C++17C++20Learn C++Syntax

What is the conjunction (std::conjunction) metafunction in C++?

Worth reading...
Modern Windows “Hello World” 3D Example in C++ Builder