-1

how characters defined in the computer? I mean, every sign shown visually, so how is it drawn? and I don't mean ASCII. For example how the letter A is actually drawn? or a circle. From what I found it is related to pixels that turned on and off.

If I want to draw a circle in C++, how do I do this if I want a real circle without spaces and not with *. Without using a function from graphic library.

TNX

  • It's a interesting question IMHO but I don't know if it's for SO once it's just accept specific programming questions. EDIT: possible related question: http://stackoverflow.com/questions/13832387/how-does-the-computer-draw-a-letter – The Mask Mar 22 '14 at 21:20
  • Depends on whether you have control over individual pixels. If you do, try Bresenham's algorithm http://en.wikipedia.org/wiki/Midpoint_circle_algorithm – cup Mar 22 '14 at 22:04

2 Answers2

0

You can't draw graphics on the console window. If you are using visual studio on windows for your programmning, You'll need to create a window and use GDI calls for drawing on the window.
This looks like a nice starter tutorial:

http://www.codeproject.com/Articles/133449/MFC-GDI-Drawing-using-Pen-and-Brush

To answer "how the letter A is actually drawn" in detail would take far too long. In short - your computer has some graphics hardware that keeps track on what color each pixel of the screen should be and the operating system (Windows) has various ways to tell the hardware what colors the pixels should be. One of these ways is GDI. Another is OpenGL which can allow you to draw 3D things as well.

shoosh
  • 76,898
  • 55
  • 205
  • 325
  • I meant how the letters and numbers exist in the first place in the CPU. All u have is binary numbers that not even numbers it's more like 'on/off' of electric signal. – user3450764 Mar 23 '14 at 06:59
0

You may want to check some basic computer architecture concepts. Get a good book and in a day or two you should have a good understanding on how 0s and 1s get translated to instructions and data. I highly recommend the books "Code: The Hidden Language of Computer Hardware and Software" and "The Elements of Computing Systems: Building a Modern Computer from First Principles".

Veritas
  • 2,150
  • 3
  • 16
  • 40