Posts

Showing posts from March, 2021

Sample programs

Image
 • We are going to discuss some simple programs in turbo C before going to graphics program that is terminal in graphic mode. • So simple programs in text mode. 1) Program to print Hello world on different line. #include<stdio.h> #include<conio.h> int main() {     int c= 5;      for(int i=0;i<12; i=i+2)     {     gotoxy(c,i);     printf("Hello world!");     c=c+2;     } getch(); return 0; } Explanation: • we have also discussed prior about text mode in Turbo C let's understand it in short. • So this is the image representation of text mode where: 1) screen is divided in Rows and Columns. 2) we have 80 rows and 25 columns 3) Here first coordinate is of column and another is row example: (80,25) • 80 is column and 25 is row only in turbo C text mode it's reverse as it is normally. 4)  program we did above is of Controlling the cursor with the help of function gotoxy( )  it's a function used to send the cursor to the specified coordinates in the activ

Basics of Graphics programming

Image
 • We are going to see the basic syntax which must be followed while programming the graphics in turbo C++  1) By default are output screen or the terminal (Black screen were we get the output of programs) is in text mode. 2) So to initialize the terminal in graphic mode(x-axis and y-axis) we use initgraph function in our program. 3) Here the screen resolution is in text mode. X-direction is horizontally across the screen and y-direction is vertically down the screen. The top left corner is (0, 0) and the bottom right corner is (80, 25). While executing the program, Turbo C opens the console in text mode only.                   Terminal in Graphics mode  4) In text mode the screen is divided into 80 columns and 25 rows. In case of graphic mode the total screen is divided into 640 pixels width and 480 pixels height. Latest displays are even rich in resolution. 5) This function is present in "graphics.h" header line in turbo C.  Sample graphics program:  #include<stdio.h>

Line Basic Concepts

Image
 • We are going to study about Line Basic Concepts on Raster Screen. • so we are going to discuss what are the different ways in which line can be represented on Raster Screen and some of there respective features. 1) Vertical and Horizontal Line  • They have same width. • Straight line.  • Effective spacing is less. • More brighter. 2) 45° Line  • Width is not a constraint.  • Straight line. • More effective spacing. • Less brighter. Explanation:  • Point to remember is when there is more spacing between the points of line less brighter it will be and vice versa.  • But more spacing leads to effectiness in orientation of line. 3) Line with other orientation • In both of the above image the lines are nethier straight nor of same width. • Here points of line that is Pixel is approximated because while drawing the single line at point we get two points one is above the line and another is below the line. • But here approximation doesn't make a wide difference because pixel are very c

Video Basic

1) What is Video? •Video, or moving image in general, is created from a sequence of still images called frames. •By recording and then playing back frames in quick succession, an illusion of movement is created. •Video can be edited by removing some frames and combining sequences of frames, called clips, together in a timeline. 2) What is a Video Format? •A video format defines the way in which video is recorded and stored. It normally specifies: => Codec/compressor =>Frame rate => Frame size => Frame aspect ratio => Pixel aspect ratio => Scanning method (interlaced or progressive) • Common formats are DV, HDV and AVCHD. 3) What is a Codec (Compressor)? • Codec is short for coder-decoder and describes the method in which video data is encoded into a file and decoded when the file is played back. • Most video is compressed during encoding, and so the terms codec and compressor are often used interchangeably. • Transcoding is the process of converting from one codec to

Shadow Mask technique

Image
  1) Shadow Mask technique is used in Raster Scan Display and produces wide range of colour, which wasn't possible in Beam penetration technique. 2) Here on the screen we have 3 dots of each color which means one pixel has three value of color i.e RGB which can create many different shades of color. 3) So in this technique we have 3 electron gun's which are assigned for there respective color RGB and one more most important thing that is a grid just behind the screen which is known as "Shadow Mask Grid" . 4)  Shadow mask grid is pierced with small round holes in a triangular pattern. 5) Th e 3 electron beams are deflected and focused as a group onto the shadow mask, which contains a sequence of holes aligned with the phosphor- dot patterns . 6) There is one gun for each of 3 Color RGB . 7) when these three colors mixed together can create all the colors we see on the screen, but remember these gun don't shoot the bullets instead they shoot a powerful beam of elect

Colour CRT Monitors

Image
  1) The normal CRT that we have seen up till now generate Images of single color due to limitation of phosphore coating i.e we saw in CRT Introduction part. 2) Phosphore are coated on screen so that when electrons strike on screen it illuminate light. 3) There are Two basic technique used for producing color on CRT are: • Beam penetration technique. • Shadow Mask technique. Now we will see Beam penetration technique. A) Beam penetration technique 1) Beam penetration technique is used with Random/Vector display where CRT is coated with 2 layers of phosphore, usually RED and GREEN. 2) Outer layer is RED and Inner layer is GREEN phosphore. 3) Color depends on how far the electron beam penetrates into phosphore layer. Penetrates means strike or enter. 4) Low electrons beam speed strike only RED phosphore those produces RED trace i.e RED color on the screen. 5) High electron beam speed penetrates into GREEN phosphore and produces GREEN trace on screen. 6) Medium electron beam speed produce

Difference between Raster and Random Scan Display

Image
  A ) Raster Scan Display 1) The Architecture of Raster Scan Display consist of a display controller, Keyword, Mouse, CPU, Video controller, Refresh buffer and CRT. 2) Refresh buffer is a temporary place where picture informations is stored in order to refresh the screen. 3) The video controller Reads the refresh buffer and produces the actual image on the screen 4) The Picture information is stored in the form of 0's and 1's in the refresh buffer. 5) So Information of picture is stored in refresh buffer and it is read by Video controller as in above architecture the output will be letter 'T', But How is picture displayed by video controller? 6) It is done through scanning one scanline at a time, from top to bottom and then back to top. 7) Raster Scan Display is mainly used in JPG, GIF, PNG image format. 8) when Raster image is Zoomed or made bigger in size in layman terms, the image will be distorted or we will get a blur image, Because they are made up of Pixel i.e (

Raster Scan Display

Image
 •   Raster  can be explained as a rectangular collection of dots or points plotted. i.e (Grid of rows and columns)     1) In a raster-scan system, “the electron beam is swept across the screen, one row at a time from top to bottom”. As the electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots as below: 2) In a simple black-and-white system, each screen point is either on or off, so only one bit per pixel is needed to control the intensity of screen positions. For a bit level system, •  A bit value of 1 indicates that the electron beam is to be turn ON at that position.  • A bit value of 0 indicates that the beam intensity is to be turn OFF.  •Additional bits are needed when color and intensity variations can be displayed. 3) Picture definition(Data about image) is stored in a memory area called the refresh buffer or frame buffer.  4)This memory area holds the set of intensity values for all the screen points. Stored inten