Site icon Learn 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.

[crayon-662b9aab886e1563462892/]

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

[crayon-662b9aab886ea681741487/]

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.

Exit mobile version