Three-dimensional Text : Turbo C++

  Here, we shall show you a program that displays some three-dimensional text in various orientations, various degrees of thickness as well as in various colours. As you might guess, this program has been created using Turbo C++ and uses BGI graphics. The various modules used for drawing and displaying the three-dimensional text in this program have been described below :

The two main modules of this program are _3DTextOutput() and Draw3DText().


a) _3DTextOutput() – This module is called directly by the main(). The whole process of generating and showing the three-dimensional text begins here. Here, various calculations are performed in order to determine the orientation, thickness and colour of a particular instance of the text to be displayed. After the required calculations are finished for a particular instance of the text, Draw3DText() is called to instantly display that text on the screen. After this, calculations are performed to determine the data regarding the next instance of the text.

The whole process continues several times until all the text has been successfully displayed on the screen. After the drawing process is complete, the function waits for user input. If the user presses the ESC key, the program quits; otherwise the control passes back to main(). The whole process goes on like this :

void 3DTextOutput()

{

// Perform calculations

// Call Draw3DText to draw the text

// Perform calculations to draw the next instance of the text, back to the first step

// When everything has been drawn, wait for input from the user

}

b) Draw3DText() – This module is called by _3DTextOutput() for performing the actual drawing after the required values have been calculated. It receives the values sent by _3DTextOutput(), manipulates them and then uses them to display the three-dimensional text on the screen. When one instance of the text has been displayed properly on the screen, the control goes back to the calling function i.e. _3DTextOutput().

The whole process goes on like this :

void Draw3DText()

{

// Perform the final calculations before drawing the text

// Display the text on screen

// When the current instance of the text has been displayed, return the control back to _3DTextOutput()

}

The Output

The output of this program has been displayed in the images below :

Three-dimensional Text

Three-dimensional Text

Three-dimensional Text

Click here to download the source code of this program.

If you liked this program, please let us know 🙂

(Visited 337 times, 1 visits today)

10 comments

  • Muy bueno. El programa texto tridimensional es uno de mis favoritos 🙂

  • Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword.

  • This is a really good program. I would like to learn BGI graphics. Can you help me?

    • You can learn BGI graphics easily. First read this article to get a basic idea of how things work in BGI and then read these articles :- BGI drawing functions- Part 1, Part 2, Part 3 and Part 4. After reading all these, you need to have a bit of practice and create your own programs. As you can see, there are lots of programs using BGI graphics on this website to give you some creative ideas. Best of Luck!!! 😀

  • how to spin article

    Niсe blog here! Also your wеbsite loads up very fast!
    What hlst are you using? Can I get your affiliate link to your host?

    I wish my sіtе loaded up as fast as youгs lol

  • Cherelle Bockoven

    Hello! I just wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing several
    weeks of hard work due to no data backup. Do you have any solutions to stop hackers?

Leave a Reply

Your email address will not be published. Required fields are marked *