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.

close

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.

About author

Dr. Yilmaz Yoru has 33+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He was born in 1974, Eskisehir-Turkey, started coding in college and graduated from the department of Mechanical Engineering of Eskisehir Osmangazi University in 1997. He worked as a research assistant at the same university for more than 10 years. He received his MSc and PhD degrees from the same department at the same university. Since 2012, he is the founder and CEO of Esenja LLC Company. He has married and he is a father of a son. Some of his interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.
Related posts
C++C++11C++14C++17Introduction to C++Language FeatureLearn C++

What Are Generalized Constant Expressions (constexpr) In C++?

C++C++11C++14C++17Learn C++

What Is The alignas Alignment Specifier In Modern C++?

C++C++11C++14C++17Introduction to C++Learn C++

What is a Forward Declaration enum Enumeration in C++?

C++C++11C++14C++17Introduction to C++Learn C++Syntax

What Is Static Assertion And How To Use static_assert In C++?

Worth reading...
Learn How To Adapt Classic Windows C/C++ Samples To Modern C++ In C++ Builder