SlideShare uma empresa Scribd logo
1 de 48
CHAPTER 1:-

Basic of Computer Graphics




                                      Created by : Mr. Krishna g G. Jadhav
                                                            RLPC Buldhna,
                             Contact:-kparth.jadhav@gmail.com,7875075068
INTRODUCTION:-

•The term Computer graphics includes almost everything on the
computers that is not text.
•Today‟s we are touch lot‟s of computer generated graphics in our
daily life. Ex. Weather report on television, newspapers etc.
• The computer is called data processing machine, or we can say it is a
too which performs storing, processing and manipulating data. Ex.
Performing arithmetic operations and collect and generate data
according to user‟s need.
•A machine can easily generate hundred lines of code or thousands
entries of table. At this stage Computer graphics very useful, because
reader can‟t understand lines of code. Etc.
DEFINITION:-
Computer Graphics is the study of technique to improve the
communication between human and machine.
                      In above definition:
The word computer Graphics means picture, graph, or scene
is drawn with help of computer.


        Computer Graphics allows communication through pictures,
        charts and diagrams, as there is old adage “thousand words
        can be replaced by a single picture.
APPLICATIONS:
•Engineering and/Scientific S/W, Business S/W.
•T.V. channels, Space simulation training.
•PCB designing, map preparation.
•User interface, animation.
•Making charts, Image processing.
•Office automation.
•Desktop Publishing.
•CAD/CAM
•Art & Commerce.
•Process Controlling.
•‘Visual effects ‘ in movies and Computer Games.
DISPLAY / VIDEO ADAPTERS:
A video adapter or display adapter is an integrated circuit card in a
computer that provides digital to analog converter, video RAM and a
video controller so that data can be sent to a computers display.
Figure:
Display adapters are characterized by:
1. Resolution: it refers to the no. of dots on the screen.
    It is expressed as a pair of no‟s that give the no. of dots on
    horizontal line and vertical lines. For example:
    640X480,1024X768.
•Computer display generates colors by combining amounts of
Red, Green , and blue. these colors are controlled by 3 wires in
the display cable. Each has variable amount of voltage
represented by a number from 0 to 255. this up to 16 million
possible colors.
2. Color Depth:
•It is determined by the no. of bits assigned to hold color
value. For example: 1 bit= 2 colors(Black & white)
4 bits= 16 colors,8 bits= 256 colors,16 bits= 32 thousands
colors,24 bits=16 million (high colors),32 bits= latest(true
color).
The display adapter stores a value (4 to 32 bit) in memory for
every dot on the screen. The amount of storage needed is
determined by multiplying the no of dots(Resolution) by the
memory required for each dot.
•For Eg. VGA having resolution 640X480 with 4 bit color 256 KB
memory is required.
3.Referesh Rate:
•   It determines the speed of that display uses to paint
    the dots on the screen. The original VGA display run
    at 70Hz
•   A utility program is typically provided on diskette to
    set the refresh rate on the display adapter for various
    resolutions.

4.Acceleration:
•   It Can draw lines and boxes, fill background color, scroll
    text and manage the mouse pointer.
•   With an accelerator only CPU has to send the video adapter
    a command to draw lines.( with may include starting ,ending
    point and width, color of line.
•   An accelerator card reduces the amount of data that must be
    transferred between PC & display (video)adapter.
•Modes: Many display adapters support several
diff. modes of resolution these are:
1. Text Mode or Character Mode.
2. Graphics Mode.

1. Text Mode:    this video mode display screen is divided in to
   rows and column's of boxes. Each box can contained one
   character.
                                 •Including all VGA video standards

                        25 Rows PC ,Supports a text mode that
                                 divides the screen in to 25 rows &
                                 80 Columns.
                                 •Display Screen treated as an
                                 Array of block. Each can be hold
                                 one ASCII Character.
  80 columns
2. Graphics Mode:        this video mode display screen is divided in
     to an array of pixel.
1.   Pixel is the smallest addressable element screen.
2.   Each pixel has name or address,so that we can uniquely identify
     that .
3.   Programs that run in graphics mode can display an unlimited
     variety of shapes and fonts, whereas program running in text
     mode are severely limited.
4.   Programs that runs entirly in graphics mode are called graphics
     based programs




                              480




          640
 Graphics Mode function: If                     we want start graphics
   programming then we need to files which GRAPHICS.H &
   GRAPHICS.LIB. These files provided as part of turboc C and C++.
   The graphics mode function required a graphics monitor and
    adapter card such as CGA,EGA & VGA.
For Eg.   /* sample example to draw line*/
          #include<stdio.h>
          #include<graphics.h>
          void main()
          {
              int gd = DETECT,gm;
              initgraph(&d ,&gm,” C:/tc/bgi”);
          Line(200,200,100,100);
          closegraph( );
          restorecrtmode( ) ;
          }
    Graphics Mode function:
1) Basic Graphics mode function:-
1).initgraph( ):- it is used to initialized graphic mode.Syntax:- initgraph(int gd,int
gm, “path”).
gd(Graphics Driver):- this is the argument specifies the graphics driver to be
used and it interfaces with display adapter. Some available graphics driver are
CGA,EGA,VGA
gm (Graphics Mode):- Each graphic adapter can use several diff possoble graphics
modes. The mode argument is used to select particular mode.
path:- It specifies path to graphics driver. Graphics drivers are files with BGI file
extensions. The path name is string threfore it must be surrounded by quotes.
DETECT : is a macro which automatically select driver.
Eg. int gd = DETECT,gm;
    initgraph(&d ,&gm,” C:/tc/bgi”);
2). closegroup( ): it is used to close graphics mode. Closegraph function restores the
previous display mode. Syntax:- closegraph( );
   Graphics Mode function:
2) Shapes:- In computer graphics has many inbuilt commands, which can be used either to draw a
shape and/or for filling a colour in any bounded shape.

1) lineto( ):- This command draws a line on sceen from current cursor position
to the x,y position. Syntax :- lineto(x,y);
2) line ( ): this command draws line on screen. Syntax(x1,y1,x2,y2);.
3)circle( ):- Draws a cirlce on screen. Syntax:- circle(x,y,r);
4) Rectangle( ): draws a rectangle on screen. Syntax rectangle(x1,y1,x2,y2);
5) ellipse( ): draws ellipse on screen. Syntax :- ellipse(x,y,start,end,xrad,yrad);
x,y are the co-ordinates of center point.
Start, end- starting & ending angle of ellipse.
xrad,y,rad- x-axis and y axis radious respectively.
6) drawpoly( ): It draws outline of polygon having specified no of sides.
Syntax:- drawpoly( n,array), where n is no of vertices of polygon.
Array is integer array name which stores co-ordinates of vertices of a polygon
Eg:- drawpoly(4,p), int p[8]=[10,10,40,40,60,60,100,100]
 Text Mode function:
    We had seen, text mode screen is divided in to characters position. Screen
     is mapped as no of rows and no of columns,.
Graphic function of Text mode:- 1) Window:- This function specifies a window
     on screen. Syntax:- Window(left,top,right,bottom);
2) putch( ): it displays a single character at a cursor position. Eg. putch(„char‟)
3) clrscr( ): It clears the entire screen and locates the cursor in top left corner

     of screen.
4) gotoxy( ):- it positions the cursor to the specifies location on screen, where location
     is specified by the x,y co-ordinates of the point. Syntax(gotoxy(x,y).
5) puts( ):- It display string at cursor position. Syntax :- puts(s1);
6) textcolor( ):- It sets the color for text. Any text display after this command will be
     displayed in colour specified by this command. Syntax:- textcolor(color); .
Eg. :- int col=2; textcolor(col);
Text mode graphic function supported following colors are no from 0 to 15.
Colour     Colour     Colour    Colour        Colour   Colour Name        Color    Colour
constant   Name       const.    Name          const.                      const.   Name
     0      BLACK         5       MAGENTA        10      LIGHTGREEN         15     WHITE


     1       BLUE         6        BROWN         11       LIGHTCYAN


     2      GREEN         7      LIGHTGRAY       12        LIGHTRED


     3       CYAN         8      DARKGRAY        13     LIGHTMAGENTA


     4       RED          9      LIGHTBLUE       14         YELLOW


7). delline( ):- It deletes a line specified by cursor position. After deletion, all
subsequent line will be pushed up by one line. Eg. gotoxy(4,5); delline( );
8) . inline( ):- It insertes a blank line at current cursor position. Eg. gotoxy(4,5);inline(
);
9). textbackground( ):- It changes background colour of text. The valid colour for
CGA are from 0 to 6 in above table.
10). moveto( ):- It moves cursor to the location specified by int(x,y) co-ordinates.
11)outtextxy( ):- It displays text within quation mark at specified location with latest
set colour style. Eg. outtextxy(x,y,”sentence”);
   GRAPHICS.H : Header files contains definitions of all the graphic
    functions and constants. While GRAPHICS.LIB file contains
    standard graphics function.
                 /* sample example to draw line*/
                 #include<stdio.h>
                 #include<graphics.h>
                 void main()
                 {
                     int gd = DETECT,gm;
                     init graph(&d ,&gm,” C:/tc/bgi”);
                 Line(200,200,100,100);
                 closegraph( );
                 restorecrtmode( ) ;
                 }
 Graphics Devices:
1. Joysticks: A joystick is nothing but a small vertical lever which
     is usually called as stick mounted on the base and is used to move
     the cursor on the screen. It consist of two potentiometers
     attached to a single lever. As we move the lever, the
     potentiometer setting get changed and the X and Y coordinates on
     screen get changed.
2.   Track ball: Track ball is some sort of an inverted mouse where the
     ball is held inside the rectangular box. the positioning of the
     cursor is associated with orientation of the trackball.
3.   Mouse: (Every one known about the mouse)
4.   Light pen: Light pen consist of photocell mounted in a pencil like
     case. It is a pencil shaped device which is used to point a
     particular position on the screen .
 Graphics Devices:
5. Touch panels: Touch panel allow displayed object or
   screen positions to be selected with a touch of finger.
1. Optical touch panels employ a line of infrared light
   emitting diodes(LED) along one vertical and one
   Horizontal edge of the frame. The opposite vertical and one
   horizontal edge contains light detectors. These detectors
   are used to record which beams are interrupted when the
   panel is touched. The two crossing beams are interrupted
   identify the horizontal and vertical coordinates of the
   screen positioned selected.
 Graphics Devices:
                                   •Electron gun generates a
6. CRT: basic arrangement of CRT:. beam of electrons which passes
                                   through focusing and deflection
                                   system and strikes on specified
                                   position on phosphor coated
                                   screen. When electron beam
                                   strikes phosphor that phosphor
                                   that phosphor spot emits light
                                   and thus the point on screen is
                                   visible.

                                       •Focusing system makes
                                       electron beam extremely finely
                                       focused and makes highly
                                       concentrated small spot when it
 Basic Construction of CRT             strikes phosphor.othrwise beam
                                       will spread when it reaches the
                                       screen.
Electron Gun:
Electron gun consist of heating fillament,cathode and control grid. when
cathode is heated with heating filament inside it by passing current through
filament, cathode generates electrons.Cathode is surrounded by metal control
grid with a hole at one end which allows electrons to escape. Intensity of
electron beam is controlled by setting voltage levels on control grid. A high
negative voltage applied to control grid will shut of beam by repelling and
stopping them from passing through small hole at the end of control grid.
•Raster scan CRT:-
•In this electron beam moves all over the screen one row at a time.

•As electron beam moves across each row, beam intensity is turned

ON and OFF to create picture pattern.

•Here picture definition is stored in memory called as refresh buffer

or frame buffer.

•This refresh buffer holds set of intensity values for all screen points.

These stored intensity values are tried from buffer and displayed on

screen one row at a time. When beam is moved from left to right, it is

ON and when moved from right to left it is OFF.
•Raster scan CRT:-
•Raster scan may use non-Interlace or interlace technique to display
picture.
•   In non-interlaced, electron beam scans through each line by line.
•In interlaced techniques, beam firstly scans through even lines and
then odd scan lines thus scanning screen twice, beam scans through
alternated line first and then through remaining alternated lines.




Fig. Non-Interlace                       Fig. Interlace
•Random scan display:-
•Random scan display uses the technology to draw directly the
pictures on the screen. The beam is displayed on the positions where
the picture has to be displayed .
•Random scan monitors draw a picture one line at a time and for this
reason are also referred to as vector display.
•Refresh rate depends on the number of lines to be displayed. Picture
definition is stored as a set of line drawing commands in an area of
memory referred to as the refresh display file.
Advantages: 1) it has very high resolution and limited only by the
monitor.2) In random scan, easy animations are possible.3) It requires
less memory.
Disadvantage:- 1)It requires processor controlled beam.2) It cannot
draw a complex image as it has limited density. 3) it is very expensive
in terms of color.
•Difference between Raster and Random scan display:-

Raster Scan                                      Random Scan
•It Stores Information in memory area            •It Stores information in memory area
called refresh buffer or frame buffer            called the refresh display file
•To display information the electron beam        •To display a specified pictured the
return to the left side of the screen to begin   system cycles through the set of
displaying the next scan line at the end of      command in the display file, drawing
each frame, the electron beam returns to
                                                 each component line in turn. After all
the top left corner of the screen to begin the
next frame.                                      line drawing commands have been
                                                 processed, the system cycles back to
                                                 the first line command in the list.
•Scan conversion is not required                 Scan conversion is required
•Scan conversion hardware is not required        Scan conversion H/W required.
•Cost is low                                     Cost is more
•Raster display has abilityto display areas      Random scan display draws only lines
filled with solid colours or patterns.           and characters.
•Frame Buffer:-
•A frame buffer is large contiguous piece of computer memory which is used to store the
display image..
•The diff kinds of memory used for frame buffers are disk, IC shift registers, drums etc.
•To display a pixel on raster display, minimum 1 bit is used in frame buffer for text to
maximum 24 bit in a frame buffer for graphics.
•When 1 bit is used to generate a pixel, the picture will be Black and white(0 & 1).
•A frame buffer stores information in digital form while raster display requires voltage to
generate pixel. A single bit frame buffer raster CRT display is as following fig.




                                    D
                          O         A
                                    C
                                           Electron Gun
                      Information

                                                                        Raster Display

  Frame buffer
                        DAC:- Digital to Analog Converter
•Frame Buffer Continued:-
•If the bits are increased from 1 to n then 2n intensity level can be achieved, for this, all the
n bits are checked and resulting value is calculated. This value is given to DAC to generate
appropriate voltage to set intensity of the pixel on the raster




                                              1
                                                       D
                                              0        A
                                                       C
                                                            Electron Gun
                                              1
                                      Information 2n

                                                                                Raster Display




  N Frame buffer

                        DAC:- Digital to Analog Converter
•Rotating memory Frame Buffer Continued:-                                Drums and disks
were widely used in frame buffers to store the image information.
• It is required to be refreshed continuously. Thus, it is necessary to read the disk or
drum again and again to refresh display.
•For this the rotating speed is made to coincide with the refresh rate of the screen.
•To generate a pixel of desired intensity or colour, it is first necessary to read the disk or
drum.
•The information stored in disk or drum is in digital form, hence it is necessary to convert
it into analog form using DAC and then this analog signal is used to generate the pixel.
•If only one bit is used to generate the pixel then only black and white picture is possible.
•Disadvantage:- 1) the cost of the memory is high. 2) It requires more time due to latency
problem.



           Disk                       D
           or                         A
           Drum                       C                Electron Gun




                        Digital                                        Screen
                        Information
                                       Analog signal
•Shift register Frame Buffer :-
 •It is IC, the problem with the rotating memory is that it is slow and expensive while IC-
 shift register can perform the same task with better speed and is less expensive.
 •In this circuit, when pulse is applied, the content of memory are shifted by one place
 removing the last bit and inserting it into the starting bit.
 •It is rotating the information in a circular form.
 •In this, one bit of memory is used as an intensity value.
 •For color or gray scale display more than one IC, shift register can be used in parallel.
 •Disadvantage: 1.It requires more time due to latency problem.2)In shift-register, even small changes requires
 more time.




                   0      0      0
                   1      1      1        1
Direction of                                        D
rotation           1      0      1
                                          0         A
                   0      0      0                  C
                                                           Electron Gun
                   0      0      0        1
                                  Information
                                                                                    Raster Display

                              DAC:- Digital to Analog Converter
•Random Access Frame Buffer :-
•Frame buffers are made up of random access circuit, and the color or gray scale of the pixel
can be set by 1,2,4,8 or more bits.
•1 bit is generally used in text generation and any simple 2-D graphics figures like square,
triangle.
•To fill up the graphics figure, 2 to 4 bits of information are required for diff types of
shading effects while 8 or more bits are used for high quality graphics.
•In color display 3 guns are used for 3 primary colors .E.g.- Red, Green, Blue, one for each.
                                                 Red Electron
                           D                     Gun
                           A
                 R         C

                           D
                G          A             Green Electron
                                         Gun
                           C

                           D                BlueElectron
                B          A                Gun
                           C                                             Screen
                                 Analog signal
•Random Access Frame Buffer continued:-
•Another method uses a colour map. The digital information from the frame buffer is
consider as address to a colour map table.
•8 bits are used hence it is possible to address 256 colour map table where colour component
is defined with high precision, it gives better results.




R    G   B                                      Red Electron
                            D                   Gun
                            A
                 R          C

                            D
                G           A            Green Electron
                                         Gun
                            C

                            D               BlueElectron
                B           A               Gun
                            C                                        Raster Display
                                Analog signal
•Colour CRT Monitor:-
•A Color CRT can display colour pictures by using combination of
phosphor that emits diff. coloured lights. Diff. colours are produced
by combining emitted color light from diff. phosphor.
The two basic techniques used for producing colour display on CRT are:
1).Beam Penetration techniques                2).Shadow Mask CRT
•1) Beam Penetration Techniques: It is used with random scan monitors. In
this,normal CRT screen is coated with two phosphor layers. Here red
phosphor layer is deposited behind green phosphor layer. A slow electron
beam excites only red phosphor layer and thus produces only red trace. A very
fst beam penetrates through red layer and excites green layers also & thus
gives green trace. A beam accelerating voltage controls the speed of beam and
hence produces diff. screen colour display.
•Drawbacks: 1)Limited Rage of colours are produced.
•2). Need to change beam accelerating voltage, which is difficult.
•Shadow Mask CRT :- It Can display much wider range of
colours than beam penetration techniques.

•In this type of CRT a metal plate having small round holes in a triangular

pattern call shadow mask is inserted behind phosphor layer.




                                                                    Red spot
                                                                    Green spot
                                                                    Blue spot




Electron
Gun
                       Shadow
                       mask                Screen

      Fig. Shadow mask CRT
•Direct view storage tube(DVST) :- It Consist of two
electron guns as writing gun & flood gun. Writing gun stores picture pattern
as a positive charge on storage grid.
•This picture pattern is transferred to phosphor by continuous flood of
electron generated from flood gun.
•Flood electrons passes through collector which smoothes out flow of
electrons. Electrons passes through collector at low speed and are attracted by
positively charged picture pattern on storage grid and are repelled by rest.
                                  Flood
                                  Electrons
             Focusing and                                     The attracted electrons by positive
             defelection system
                                                              picture pattern pass right through
                                                              it and strike on phosphor making it
Flood gun                                                     visible screen.




                                                     Screen



                                                          Fig. DVST
Electron       Writing
Gun            beam
                     Collector
                                      Storage Grid
•Flat panel Display:-


•Flat panel display devices are very thinner than CRT.

•These display devices have low volume,weight and power requirement as

compared to CRT.

There are two types display.

•1)Emissive Display:- These devices convert electrical energy into light. Eg.

Plasma panels, LED etc.

•2)Non-Emissive display:- They use optical effects to converts sunlight or light

from some other source in to graphics patterns. E.g. LCD.
•Plasma panels:-
•It Consist of two sheets of glass with thin and closed spaced grid electrodes
attached to inner faces and covered with dielectric material. These are
attached as series of vertical conductors on one glass plate and horizontal on
other glass plate.
•The space between two glass plate, is filled with neon gas and is sealed. By
applying voltage between electrodes the gas within panel is divided into tiny
cells and each cell is independent of it‟s neighbors. firing voltage applied to

                              Horizontal             Pair 0f horizontal and
                              conductos/electrodes   vertical conductors
Gas                                                  cause the gas at
panel                         Glass Plate
                                                     intersection cell to
                                                     break down into
                       Cell
                                                     glowing plasma.

                     Glass Plate


 vertical conductors
 /electrodes
                       Fig. Plasma panel Display
•Plasma panels:- contd…
•Merits:-
•1) light weight,less bulky device.
• 2)produces flicker free image.
• 3) refreshing is not required.
•4) it allows selecting erasing and writing.
•Demerits:-
•1)poor resolution
•2) It needs complex addressing and wiring.
• 3) Costly.
•LCD(Liquid crystal Display:-
 •This display use thread like liquid crystal compounds that tend to
 keep the long axes of rod shaped molecules aligned. These nematic
 compounds have crystalline arrangement of molucules,yet they flow
 like a liquid and hence termed as liquid crystal display.
 •In following figure, two conductors defines a pixel position. Normally
 the molecules are aligned as shown in the “On State”
Transparent
Conductor
                              Nematic Liquid crystal      •Polarized light passing through
                                                          the material is twisted so that it
                                                          will pass through the opposite
                                                          polarizer.
                                                          •The light is then reflected back
                                                          to the viewer. To turn off the
                                                          pixel, apply a voltage to the two
                                                          intersecting conductor to align
Polarizer
                                                          the molecules so that light is not
                                  Transparent conductor
                   On State                               twisted.
•Primitive Operations:-
•Most of graphics systems provide basic set of graphic primitive commands.

•Graphic primitives are the functions that we use to draw actual lines and the
characters that make up the picture. These functions provide convenient
method to application programmer for describing pictures. Basic three main
primitive functions are:
•Move to(x,y):- It used to set the current beam position to (x,y). It moves beam
from previous current position to (x,y) position without drawing line.
•Line to(x,y):- It used to draws line from current beam position to the point
(x,y).
•Draw text(s):- It used to displays the string „s‟ with its lower left corner at
current beam position and reset current beam position to string‟s lower right
corner.
•Display file Interpreter:-
•In raster scan display image information stored in frame buffer. Here frame buffer
stores intensity values of all pixel on screen. Whereas in vector refresh display only line
commands necessary to make picture are stored. These line commands are stored in file
is called display file.
• Picture image is firstly stored in display file in form of commands and then
some program executes these commands and convert these commands in to
actual picture is called display file interpreter, and it serves as interface
between graphics program and display device..




 User Program                             Interpreter
                          Display file                          Display File




          Fig:- Display file Interpreter
•Display file Structure:-
• Display file contains series of commands required to draw a required picture. These
commands are made up of two parts as-
• i) Operation code(op code) :- Op code identifies what type of command it is and
operands provide co-ordinates of pint(x,y) to process command. Each command needs
three array to store itself in display file. First Array (DF-OP[ ]) stores op code, second
array (DF- X[ ] ) stores x co-ordinate and third array (DF- Y [ ]) stores y- co-ordinate of a
point. For eg. DF-OP[3], DF- X[3] and DF-Y[3]. Before starting to write a series of
commands we shall assign come op codes to commands. We consider here only two
commands LINE and MOVE. Lets define OP code 1 for MOVE and 2 for LINE.
•ii) Operands.
             DF-OP                  DF-X                   DF-Y
             1                      3                      3
             2                      3                      3
             1                      10                     10
             2                      10                     10

          Fig:- Display file Structure
•Graphics File Format:-
1. TIFF( Tagged Image File Format): it is a flexible,adaptable file format for
    handling images and data within a single file, by including the header tags (size
    definition etc.) defining the image‟s geometry.
•   A TIFF file also include a vector-based clipping path (outlines,cropping,image frames).
•   A TIFF file a useful image archive,because,unlike standard JPEG files, a TIFF file using
    lossless compression may be edited and re-saved without losing image quality.
•   A TIFF file is a sequences of 8 bit bytes where bytes are numbered from 0 to N.


•    Advantage:- 1) it is platform independent 2) It is independent of computer system also.
•   3) It is versatile and flexible. 4) It supports many compression schemes. 5) It supports
    additional information about images.
•   Disadvantage:- 1) It does not support multiple images in one file. 2) Complex file
    format. 3) It is open ended format, hence programmer can make changes
2) PCX:
•It is developed by ZSOFT for its PC Paintbrush program. PCX is a widely
used format for storing images.
•It is graphics file format for graphics programs running on PC‟s. It is
supported by most optical scanners, fax programs, and desktop publishing
systems. Files in the PCX format end with a “.pcx”
•The PCX is a device-independent raster image format. The file header stores
information about the display hardware(screen resolution, color depth and
palette information. Etc.) separately from the actual image information,
allowing the image to be properly transferred and displayed on computer
systems with diff. hardware.
•Advantages:- It is most widely used bitmap image format.
•Disadvantage:- 1)It has no provision for gray scale image.2) No provision for
any colour made other than RGB. 3) does not support other platform.
2) JPEG (Joint Photographic Expert (Group):
•Image files that employ JPEG compression are commonly called “JPEG files”.
•JPEG is a lossy compression techniques in which some amount of data is lost.
•Lossy compression technologies attempt to eliminate redundant or unnecessary
information although it can reduce file sizes to about 5 % of their normal size,
some detail is lost in the compression.
•JPEG/JFIF is the format most used for storing and transmitting photographic
on the world wide web. For this application, JPEG/JFIF is far superior to GIF.
•The JPEG compression algorithm is not as well suited for line drawings and
other textual or iconic graphics.
•Advantages:- 1) suitable for photographic images.2) Reduces file size
•Disadvantage:- 1) Some information of image is lost.
2) GIF(Graphic Interchange Format):
•It is simple, memory efficient and back bitmap format.
•It can be used with most bitmap editing programs. It compresses BMP files to
much smaller size.
•It sotres Image and other relevant information in sequence of blocks and sub
blocks where each sub-block has diff function regarding image information,
colour, brightness and data compression.
•This GIF allows high-quality,high-resolution graphics to be displayed on a
variety of graphics h/w and is intended as an exchange and display mechanism
for graphics images.
•Advantages:- 1) It gives compact file format.2) provids the option to specify
how many colours should be saved. 3) allows multiple image to be stored in a
single file. 4) suitable and are popular in Internet and Intranet. 5) It is device
independent. 6) It is operating System Independent.
•Disadvantage:- 1)Decompression of GIF data is slow.2) It uses only palette
colour. 3) It do not provide other RGB colour and Gray scale.
2) BMP (Bitmap):
•It is default format used by MS- windows. Here, storing and manipulation of
pixels is done with their location and attributes by bit coding method.
•In this information is stored in Device-Independent- Bitmap format.
•Information can be displayed on any display device. It uses BMP as default fill
extension.
•The default filename extension of windows DIB file is BMP.
•BMP Structure:- It Contains a bitmap-file header, a bitmap-information
header, a colour table, and an array of bytes that defines the bitmap bits.
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
RGBQUAD aColors[ ];
BYTE         aBitmapBits[ ];
•Advantages:- 1) Simple to use. 2) It is display device independent.
•Disadvantage:- 1). Large file size 2) though display device independent they
are limited to window platform. 3) can not store multiple images in one file.
•Co –ordinate System:-            •In 2D any point is address by it x & y co-
                                  ordinates like fig a. where x co-ordinate is
1. Cartesian co-ordinate system:- distance of point from origin measured along x
                                  direction and y co-ordinate is distance of a point
   y                              from origin measured along y direction & where
                                  x & Y are perpendicular to each other.
                                  •In 3D Any point is addressed by its x,y,z co
                                  ordinates as fig. b.
          p
                                  •Here in 2D & 3 D a line joining origin O to
                                  point P a radius vector.
                     x
    o                                  y


    y
                                              p

                                                         x
         p

    o               x

z
• Polar Co –ordinate System:-

 1.:-


             900


   1350                   450




                                 00
1800




 2250
                   2700
We will meet Next Chapter Line Circle And Polygon




You can give Feedback to me:- kparth.jadhav@gmail.com

Mais conteúdo relacionado

Mais procurados

Character generation
Character generationCharacter generation
Character generationAnkit Garg
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithmnehrurevathy
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan systemshalinikarunakaran1
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversionMohd Arif
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.Mohd Arif
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer GraphicsKamal Acharya
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Raster scan systems with video controller and display processor
Raster scan systems with video controller and display processorRaster scan systems with video controller and display processor
Raster scan systems with video controller and display processorhemanth kumar
 
Graphics software and standards
Graphics software and standardsGraphics software and standards
Graphics software and standardsMani Kanth
 
sutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clippingsutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clippingArvind Kumar
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical dataRajapriya82
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentationLOKENDRA PRAJAPATI
 

Mais procurados (20)

CRT (Cathode ray tube)
CRT (Cathode ray tube)CRT (Cathode ray tube)
CRT (Cathode ray tube)
 
Character generation
Character generationCharacter generation
Character generation
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Halftoning in Computer Graphics
Halftoning  in Computer GraphicsHalftoning  in Computer Graphics
Halftoning in Computer Graphics
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Raster scan systems with video controller and display processor
Raster scan systems with video controller and display processorRaster scan systems with video controller and display processor
Raster scan systems with video controller and display processor
 
Graphics software and standards
Graphics software and standardsGraphics software and standards
Graphics software and standards
 
sutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clippingsutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clipping
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical data
 
lecture2 computer graphics graphics hardware(Computer graphics tutorials)
 lecture2  computer graphics graphics hardware(Computer graphics tutorials) lecture2  computer graphics graphics hardware(Computer graphics tutorials)
lecture2 computer graphics graphics hardware(Computer graphics tutorials)
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
Boundary fill algm
Boundary fill algmBoundary fill algm
Boundary fill algm
 

Destaque

Network Security Fundamental
Network Security FundamentalNetwork Security Fundamental
Network Security FundamentalMousmi Pawar
 
ITFT-Video display devices
ITFT-Video display devicesITFT-Video display devices
ITFT-Video display devicesShifali Sharma
 
9 things about indian cyber law prashant mali
9 things about indian cyber law   prashant mali9 things about indian cyber law   prashant mali
9 things about indian cyber law prashant maliAdv Prashant Mali
 
Video display device
Video display deviceVideo display device
Video display devicemissagrata
 
Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...
Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...
Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...Markus Van Kempen
 
Video display devices
Video display devicesVideo display devices
Video display devicesMohd Arif
 
WHITEPAPER-7_years_of_Indian_Cyber_Law
WHITEPAPER-7_years_of_Indian_Cyber_LawWHITEPAPER-7_years_of_Indian_Cyber_Law
WHITEPAPER-7_years_of_Indian_Cyber_Lawguest66dc5f
 
Various Display devices and printer
Various Display devices and printerVarious Display devices and printer
Various Display devices and printerSumeet Patel
 
EDLD804 Constitutional Law Chapter 1 Presentation
EDLD804 Constitutional Law Chapter 1 PresentationEDLD804 Constitutional Law Chapter 1 Presentation
EDLD804 Constitutional Law Chapter 1 PresentationPaul Gruhn
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devicesvinay arora
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics labPriya Goyal
 
Graphics in C programming
Graphics in C programmingGraphics in C programming
Graphics in C programmingKamal Acharya
 
Lecture on graphics
Lecture on graphicsLecture on graphics
Lecture on graphicsRafi_Dar
 
Cyber law In India: its need & importance
Cyber law In India: its need & importanceCyber law In India: its need & importance
Cyber law In India: its need & importanceAditya Shukla
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics PracticalNeha Sharma
 

Destaque (20)

Network Security Fundamental
Network Security FundamentalNetwork Security Fundamental
Network Security Fundamental
 
ITFT-Video display devices
ITFT-Video display devicesITFT-Video display devices
ITFT-Video display devices
 
9 things about indian cyber law prashant mali
9 things about indian cyber law   prashant mali9 things about indian cyber law   prashant mali
9 things about indian cyber law prashant mali
 
Video display device
Video display deviceVideo display device
Video display device
 
Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...
Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...
Display device (mqtt) data with Real Time Insights on IBM Internet of Things ...
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
WHITEPAPER-7_years_of_Indian_Cyber_Law
WHITEPAPER-7_years_of_Indian_Cyber_LawWHITEPAPER-7_years_of_Indian_Cyber_Law
WHITEPAPER-7_years_of_Indian_Cyber_Law
 
Various Display devices and printer
Various Display devices and printerVarious Display devices and printer
Various Display devices and printer
 
EDLD804 Constitutional Law Chapter 1 Presentation
EDLD804 Constitutional Law Chapter 1 PresentationEDLD804 Constitutional Law Chapter 1 Presentation
EDLD804 Constitutional Law Chapter 1 Presentation
 
The information technology act,2000
The information technology act,2000The information technology act,2000
The information technology act,2000
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
 
Graphics in C++
Graphics in C++Graphics in C++
Graphics in C++
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devices
 
Graphics Programming in C
Graphics Programming in CGraphics Programming in C
Graphics Programming in C
 
Introduction to graphics programming in c
Introduction to graphics programming in cIntroduction to graphics programming in c
Introduction to graphics programming in c
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
 
Graphics in C programming
Graphics in C programmingGraphics in C programming
Graphics in C programming
 
Lecture on graphics
Lecture on graphicsLecture on graphics
Lecture on graphics
 
Cyber law In India: its need & importance
Cyber law In India: its need & importanceCyber law In India: its need & importance
Cyber law In India: its need & importance
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics Practical
 

Semelhante a Chapter 1

Computer graphics
Computer graphicsComputer graphics
Computer graphicsamitsarda3
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphicsLOKESH KUMAR
 
Computer graphics
Computer graphics Computer graphics
Computer graphics shafiq sangi
 
C Graphics Functions
C Graphics FunctionsC Graphics Functions
C Graphics FunctionsSHAKOOR AB
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)JAINAM KAPADIYA
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipeliningAreena Javed
 
Graphics software
Graphics softwareGraphics software
Graphics softwareMohd Arif
 
Circles graphic
Circles graphicCircles graphic
Circles graphicalldesign
 
Skia & Freetype - Android 2D Graphics Essentials
Skia & Freetype - Android 2D Graphics EssentialsSkia & Freetype - Android 2D Graphics Essentials
Skia & Freetype - Android 2D Graphics EssentialsKyungmin Lee
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).pptHIMANKMISHRA2
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.pptHIMANKMISHRA2
 
COMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTCOMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTvineet raj
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsPrabindh Sundareson
 
Computer Graphics Concepts
Computer Graphics ConceptsComputer Graphics Concepts
Computer Graphics ConceptsSHAKOOR AB
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...JinTaek Seo
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 

Semelhante a Chapter 1 (20)

Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphics
 
Computer graphics
Computer graphics Computer graphics
Computer graphics
 
C Graphics Functions
C Graphics FunctionsC Graphics Functions
C Graphics Functions
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
Graphics mod
Graphics modGraphics mod
Graphics mod
 
Graphics software
Graphics softwareGraphics software
Graphics software
 
Circles graphic
Circles graphicCircles graphic
Circles graphic
 
An35225228
An35225228An35225228
An35225228
 
Skia & Freetype - Android 2D Graphics Essentials
Skia & Freetype - Android 2D Graphics EssentialsSkia & Freetype - Android 2D Graphics Essentials
Skia & Freetype - Android 2D Graphics Essentials
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).ppt
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.ppt
 
COMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTCOMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORT
 
Cg lab cse-v (1) (1)
Cg lab cse-v (1) (1)Cg lab cse-v (1) (1)
Cg lab cse-v (1) (1)
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI Platforms
 
Computer Graphics Concepts
Computer Graphics ConceptsComputer Graphics Concepts
Computer Graphics Concepts
 
Unit 11. Graphics
Unit 11. GraphicsUnit 11. Graphics
Unit 11. Graphics
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 

Último

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 

Último (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

Chapter 1

  • 1. CHAPTER 1:- Basic of Computer Graphics Created by : Mr. Krishna g G. Jadhav RLPC Buldhna, Contact:-kparth.jadhav@gmail.com,7875075068
  • 2. INTRODUCTION:- •The term Computer graphics includes almost everything on the computers that is not text. •Today‟s we are touch lot‟s of computer generated graphics in our daily life. Ex. Weather report on television, newspapers etc. • The computer is called data processing machine, or we can say it is a too which performs storing, processing and manipulating data. Ex. Performing arithmetic operations and collect and generate data according to user‟s need. •A machine can easily generate hundred lines of code or thousands entries of table. At this stage Computer graphics very useful, because reader can‟t understand lines of code. Etc.
  • 3. DEFINITION:- Computer Graphics is the study of technique to improve the communication between human and machine. In above definition: The word computer Graphics means picture, graph, or scene is drawn with help of computer. Computer Graphics allows communication through pictures, charts and diagrams, as there is old adage “thousand words can be replaced by a single picture.
  • 4. APPLICATIONS: •Engineering and/Scientific S/W, Business S/W. •T.V. channels, Space simulation training. •PCB designing, map preparation. •User interface, animation. •Making charts, Image processing. •Office automation. •Desktop Publishing. •CAD/CAM •Art & Commerce. •Process Controlling. •‘Visual effects ‘ in movies and Computer Games.
  • 5. DISPLAY / VIDEO ADAPTERS: A video adapter or display adapter is an integrated circuit card in a computer that provides digital to analog converter, video RAM and a video controller so that data can be sent to a computers display. Figure:
  • 6. Display adapters are characterized by: 1. Resolution: it refers to the no. of dots on the screen. It is expressed as a pair of no‟s that give the no. of dots on horizontal line and vertical lines. For example: 640X480,1024X768. •Computer display generates colors by combining amounts of Red, Green , and blue. these colors are controlled by 3 wires in the display cable. Each has variable amount of voltage represented by a number from 0 to 255. this up to 16 million possible colors.
  • 7. 2. Color Depth: •It is determined by the no. of bits assigned to hold color value. For example: 1 bit= 2 colors(Black & white) 4 bits= 16 colors,8 bits= 256 colors,16 bits= 32 thousands colors,24 bits=16 million (high colors),32 bits= latest(true color). The display adapter stores a value (4 to 32 bit) in memory for every dot on the screen. The amount of storage needed is determined by multiplying the no of dots(Resolution) by the memory required for each dot. •For Eg. VGA having resolution 640X480 with 4 bit color 256 KB memory is required.
  • 8. 3.Referesh Rate: • It determines the speed of that display uses to paint the dots on the screen. The original VGA display run at 70Hz • A utility program is typically provided on diskette to set the refresh rate on the display adapter for various resolutions. 4.Acceleration: • It Can draw lines and boxes, fill background color, scroll text and manage the mouse pointer. • With an accelerator only CPU has to send the video adapter a command to draw lines.( with may include starting ,ending point and width, color of line. • An accelerator card reduces the amount of data that must be transferred between PC & display (video)adapter.
  • 9. •Modes: Many display adapters support several diff. modes of resolution these are: 1. Text Mode or Character Mode. 2. Graphics Mode. 1. Text Mode: this video mode display screen is divided in to rows and column's of boxes. Each box can contained one character. •Including all VGA video standards 25 Rows PC ,Supports a text mode that divides the screen in to 25 rows & 80 Columns. •Display Screen treated as an Array of block. Each can be hold one ASCII Character. 80 columns
  • 10. 2. Graphics Mode: this video mode display screen is divided in to an array of pixel. 1. Pixel is the smallest addressable element screen. 2. Each pixel has name or address,so that we can uniquely identify that . 3. Programs that run in graphics mode can display an unlimited variety of shapes and fonts, whereas program running in text mode are severely limited. 4. Programs that runs entirly in graphics mode are called graphics based programs 480 640
  • 11.  Graphics Mode function: If we want start graphics programming then we need to files which GRAPHICS.H & GRAPHICS.LIB. These files provided as part of turboc C and C++. The graphics mode function required a graphics monitor and adapter card such as CGA,EGA & VGA. For Eg. /* sample example to draw line*/ #include<stdio.h> #include<graphics.h> void main() { int gd = DETECT,gm; initgraph(&d ,&gm,” C:/tc/bgi”); Line(200,200,100,100); closegraph( ); restorecrtmode( ) ; }
  • 12. Graphics Mode function: 1) Basic Graphics mode function:- 1).initgraph( ):- it is used to initialized graphic mode.Syntax:- initgraph(int gd,int gm, “path”). gd(Graphics Driver):- this is the argument specifies the graphics driver to be used and it interfaces with display adapter. Some available graphics driver are CGA,EGA,VGA gm (Graphics Mode):- Each graphic adapter can use several diff possoble graphics modes. The mode argument is used to select particular mode. path:- It specifies path to graphics driver. Graphics drivers are files with BGI file extensions. The path name is string threfore it must be surrounded by quotes. DETECT : is a macro which automatically select driver. Eg. int gd = DETECT,gm; initgraph(&d ,&gm,” C:/tc/bgi”); 2). closegroup( ): it is used to close graphics mode. Closegraph function restores the previous display mode. Syntax:- closegraph( );
  • 13. Graphics Mode function: 2) Shapes:- In computer graphics has many inbuilt commands, which can be used either to draw a shape and/or for filling a colour in any bounded shape. 1) lineto( ):- This command draws a line on sceen from current cursor position to the x,y position. Syntax :- lineto(x,y); 2) line ( ): this command draws line on screen. Syntax(x1,y1,x2,y2);. 3)circle( ):- Draws a cirlce on screen. Syntax:- circle(x,y,r); 4) Rectangle( ): draws a rectangle on screen. Syntax rectangle(x1,y1,x2,y2); 5) ellipse( ): draws ellipse on screen. Syntax :- ellipse(x,y,start,end,xrad,yrad); x,y are the co-ordinates of center point. Start, end- starting & ending angle of ellipse. xrad,y,rad- x-axis and y axis radious respectively. 6) drawpoly( ): It draws outline of polygon having specified no of sides. Syntax:- drawpoly( n,array), where n is no of vertices of polygon. Array is integer array name which stores co-ordinates of vertices of a polygon Eg:- drawpoly(4,p), int p[8]=[10,10,40,40,60,60,100,100]
  • 14.  Text Mode function:  We had seen, text mode screen is divided in to characters position. Screen is mapped as no of rows and no of columns,. Graphic function of Text mode:- 1) Window:- This function specifies a window on screen. Syntax:- Window(left,top,right,bottom); 2) putch( ): it displays a single character at a cursor position. Eg. putch(„char‟) 3) clrscr( ): It clears the entire screen and locates the cursor in top left corner of screen. 4) gotoxy( ):- it positions the cursor to the specifies location on screen, where location is specified by the x,y co-ordinates of the point. Syntax(gotoxy(x,y). 5) puts( ):- It display string at cursor position. Syntax :- puts(s1); 6) textcolor( ):- It sets the color for text. Any text display after this command will be displayed in colour specified by this command. Syntax:- textcolor(color); . Eg. :- int col=2; textcolor(col);
  • 15. Text mode graphic function supported following colors are no from 0 to 15. Colour Colour Colour Colour Colour Colour Name Color Colour constant Name const. Name const. const. Name 0 BLACK 5 MAGENTA 10 LIGHTGREEN 15 WHITE 1 BLUE 6 BROWN 11 LIGHTCYAN 2 GREEN 7 LIGHTGRAY 12 LIGHTRED 3 CYAN 8 DARKGRAY 13 LIGHTMAGENTA 4 RED 9 LIGHTBLUE 14 YELLOW 7). delline( ):- It deletes a line specified by cursor position. After deletion, all subsequent line will be pushed up by one line. Eg. gotoxy(4,5); delline( ); 8) . inline( ):- It insertes a blank line at current cursor position. Eg. gotoxy(4,5);inline( ); 9). textbackground( ):- It changes background colour of text. The valid colour for CGA are from 0 to 6 in above table. 10). moveto( ):- It moves cursor to the location specified by int(x,y) co-ordinates. 11)outtextxy( ):- It displays text within quation mark at specified location with latest set colour style. Eg. outtextxy(x,y,”sentence”);
  • 16. GRAPHICS.H : Header files contains definitions of all the graphic functions and constants. While GRAPHICS.LIB file contains standard graphics function. /* sample example to draw line*/ #include<stdio.h> #include<graphics.h> void main() { int gd = DETECT,gm; init graph(&d ,&gm,” C:/tc/bgi”); Line(200,200,100,100); closegraph( ); restorecrtmode( ) ; }
  • 17.  Graphics Devices: 1. Joysticks: A joystick is nothing but a small vertical lever which is usually called as stick mounted on the base and is used to move the cursor on the screen. It consist of two potentiometers attached to a single lever. As we move the lever, the potentiometer setting get changed and the X and Y coordinates on screen get changed. 2. Track ball: Track ball is some sort of an inverted mouse where the ball is held inside the rectangular box. the positioning of the cursor is associated with orientation of the trackball. 3. Mouse: (Every one known about the mouse) 4. Light pen: Light pen consist of photocell mounted in a pencil like case. It is a pencil shaped device which is used to point a particular position on the screen .
  • 18.  Graphics Devices: 5. Touch panels: Touch panel allow displayed object or screen positions to be selected with a touch of finger. 1. Optical touch panels employ a line of infrared light emitting diodes(LED) along one vertical and one Horizontal edge of the frame. The opposite vertical and one horizontal edge contains light detectors. These detectors are used to record which beams are interrupted when the panel is touched. The two crossing beams are interrupted identify the horizontal and vertical coordinates of the screen positioned selected.
  • 19.  Graphics Devices: •Electron gun generates a 6. CRT: basic arrangement of CRT:. beam of electrons which passes through focusing and deflection system and strikes on specified position on phosphor coated screen. When electron beam strikes phosphor that phosphor that phosphor spot emits light and thus the point on screen is visible. •Focusing system makes electron beam extremely finely focused and makes highly concentrated small spot when it Basic Construction of CRT strikes phosphor.othrwise beam will spread when it reaches the screen.
  • 20. Electron Gun: Electron gun consist of heating fillament,cathode and control grid. when cathode is heated with heating filament inside it by passing current through filament, cathode generates electrons.Cathode is surrounded by metal control grid with a hole at one end which allows electrons to escape. Intensity of electron beam is controlled by setting voltage levels on control grid. A high negative voltage applied to control grid will shut of beam by repelling and stopping them from passing through small hole at the end of control grid.
  • 21. •Raster scan CRT:- •In this electron beam moves all over the screen one row at a time. •As electron beam moves across each row, beam intensity is turned ON and OFF to create picture pattern. •Here picture definition is stored in memory called as refresh buffer or frame buffer. •This refresh buffer holds set of intensity values for all screen points. These stored intensity values are tried from buffer and displayed on screen one row at a time. When beam is moved from left to right, it is ON and when moved from right to left it is OFF.
  • 22. •Raster scan CRT:- •Raster scan may use non-Interlace or interlace technique to display picture. • In non-interlaced, electron beam scans through each line by line. •In interlaced techniques, beam firstly scans through even lines and then odd scan lines thus scanning screen twice, beam scans through alternated line first and then through remaining alternated lines. Fig. Non-Interlace Fig. Interlace
  • 23. •Random scan display:- •Random scan display uses the technology to draw directly the pictures on the screen. The beam is displayed on the positions where the picture has to be displayed . •Random scan monitors draw a picture one line at a time and for this reason are also referred to as vector display. •Refresh rate depends on the number of lines to be displayed. Picture definition is stored as a set of line drawing commands in an area of memory referred to as the refresh display file. Advantages: 1) it has very high resolution and limited only by the monitor.2) In random scan, easy animations are possible.3) It requires less memory. Disadvantage:- 1)It requires processor controlled beam.2) It cannot draw a complex image as it has limited density. 3) it is very expensive in terms of color.
  • 24. •Difference between Raster and Random scan display:- Raster Scan Random Scan •It Stores Information in memory area •It Stores information in memory area called refresh buffer or frame buffer called the refresh display file •To display information the electron beam •To display a specified pictured the return to the left side of the screen to begin system cycles through the set of displaying the next scan line at the end of command in the display file, drawing each frame, the electron beam returns to each component line in turn. After all the top left corner of the screen to begin the next frame. line drawing commands have been processed, the system cycles back to the first line command in the list. •Scan conversion is not required Scan conversion is required •Scan conversion hardware is not required Scan conversion H/W required. •Cost is low Cost is more •Raster display has abilityto display areas Random scan display draws only lines filled with solid colours or patterns. and characters.
  • 25. •Frame Buffer:- •A frame buffer is large contiguous piece of computer memory which is used to store the display image.. •The diff kinds of memory used for frame buffers are disk, IC shift registers, drums etc. •To display a pixel on raster display, minimum 1 bit is used in frame buffer for text to maximum 24 bit in a frame buffer for graphics. •When 1 bit is used to generate a pixel, the picture will be Black and white(0 & 1). •A frame buffer stores information in digital form while raster display requires voltage to generate pixel. A single bit frame buffer raster CRT display is as following fig. D O A C Electron Gun Information Raster Display Frame buffer DAC:- Digital to Analog Converter
  • 26. •Frame Buffer Continued:- •If the bits are increased from 1 to n then 2n intensity level can be achieved, for this, all the n bits are checked and resulting value is calculated. This value is given to DAC to generate appropriate voltage to set intensity of the pixel on the raster 1 D 0 A C Electron Gun 1 Information 2n Raster Display N Frame buffer DAC:- Digital to Analog Converter
  • 27. •Rotating memory Frame Buffer Continued:- Drums and disks were widely used in frame buffers to store the image information. • It is required to be refreshed continuously. Thus, it is necessary to read the disk or drum again and again to refresh display. •For this the rotating speed is made to coincide with the refresh rate of the screen. •To generate a pixel of desired intensity or colour, it is first necessary to read the disk or drum. •The information stored in disk or drum is in digital form, hence it is necessary to convert it into analog form using DAC and then this analog signal is used to generate the pixel. •If only one bit is used to generate the pixel then only black and white picture is possible. •Disadvantage:- 1) the cost of the memory is high. 2) It requires more time due to latency problem. Disk D or A Drum C Electron Gun Digital Screen Information Analog signal
  • 28. •Shift register Frame Buffer :- •It is IC, the problem with the rotating memory is that it is slow and expensive while IC- shift register can perform the same task with better speed and is less expensive. •In this circuit, when pulse is applied, the content of memory are shifted by one place removing the last bit and inserting it into the starting bit. •It is rotating the information in a circular form. •In this, one bit of memory is used as an intensity value. •For color or gray scale display more than one IC, shift register can be used in parallel. •Disadvantage: 1.It requires more time due to latency problem.2)In shift-register, even small changes requires more time. 0 0 0 1 1 1 1 Direction of D rotation 1 0 1 0 A 0 0 0 C Electron Gun 0 0 0 1 Information Raster Display DAC:- Digital to Analog Converter
  • 29. •Random Access Frame Buffer :- •Frame buffers are made up of random access circuit, and the color or gray scale of the pixel can be set by 1,2,4,8 or more bits. •1 bit is generally used in text generation and any simple 2-D graphics figures like square, triangle. •To fill up the graphics figure, 2 to 4 bits of information are required for diff types of shading effects while 8 or more bits are used for high quality graphics. •In color display 3 guns are used for 3 primary colors .E.g.- Red, Green, Blue, one for each. Red Electron D Gun A R C D G A Green Electron Gun C D BlueElectron B A Gun C Screen Analog signal
  • 30. •Random Access Frame Buffer continued:- •Another method uses a colour map. The digital information from the frame buffer is consider as address to a colour map table. •8 bits are used hence it is possible to address 256 colour map table where colour component is defined with high precision, it gives better results. R G B Red Electron D Gun A R C D G A Green Electron Gun C D BlueElectron B A Gun C Raster Display Analog signal
  • 31. •Colour CRT Monitor:- •A Color CRT can display colour pictures by using combination of phosphor that emits diff. coloured lights. Diff. colours are produced by combining emitted color light from diff. phosphor. The two basic techniques used for producing colour display on CRT are: 1).Beam Penetration techniques 2).Shadow Mask CRT •1) Beam Penetration Techniques: It is used with random scan monitors. In this,normal CRT screen is coated with two phosphor layers. Here red phosphor layer is deposited behind green phosphor layer. A slow electron beam excites only red phosphor layer and thus produces only red trace. A very fst beam penetrates through red layer and excites green layers also & thus gives green trace. A beam accelerating voltage controls the speed of beam and hence produces diff. screen colour display. •Drawbacks: 1)Limited Rage of colours are produced. •2). Need to change beam accelerating voltage, which is difficult.
  • 32. •Shadow Mask CRT :- It Can display much wider range of colours than beam penetration techniques. •In this type of CRT a metal plate having small round holes in a triangular pattern call shadow mask is inserted behind phosphor layer. Red spot Green spot Blue spot Electron Gun Shadow mask Screen Fig. Shadow mask CRT
  • 33. •Direct view storage tube(DVST) :- It Consist of two electron guns as writing gun & flood gun. Writing gun stores picture pattern as a positive charge on storage grid. •This picture pattern is transferred to phosphor by continuous flood of electron generated from flood gun. •Flood electrons passes through collector which smoothes out flow of electrons. Electrons passes through collector at low speed and are attracted by positively charged picture pattern on storage grid and are repelled by rest. Flood Electrons Focusing and The attracted electrons by positive defelection system picture pattern pass right through it and strike on phosphor making it Flood gun visible screen. Screen Fig. DVST Electron Writing Gun beam Collector Storage Grid
  • 34. •Flat panel Display:- •Flat panel display devices are very thinner than CRT. •These display devices have low volume,weight and power requirement as compared to CRT. There are two types display. •1)Emissive Display:- These devices convert electrical energy into light. Eg. Plasma panels, LED etc. •2)Non-Emissive display:- They use optical effects to converts sunlight or light from some other source in to graphics patterns. E.g. LCD.
  • 35. •Plasma panels:- •It Consist of two sheets of glass with thin and closed spaced grid electrodes attached to inner faces and covered with dielectric material. These are attached as series of vertical conductors on one glass plate and horizontal on other glass plate. •The space between two glass plate, is filled with neon gas and is sealed. By applying voltage between electrodes the gas within panel is divided into tiny cells and each cell is independent of it‟s neighbors. firing voltage applied to Horizontal Pair 0f horizontal and conductos/electrodes vertical conductors Gas cause the gas at panel Glass Plate intersection cell to break down into Cell glowing plasma. Glass Plate vertical conductors /electrodes Fig. Plasma panel Display
  • 36. •Plasma panels:- contd… •Merits:- •1) light weight,less bulky device. • 2)produces flicker free image. • 3) refreshing is not required. •4) it allows selecting erasing and writing. •Demerits:- •1)poor resolution •2) It needs complex addressing and wiring. • 3) Costly.
  • 37. •LCD(Liquid crystal Display:- •This display use thread like liquid crystal compounds that tend to keep the long axes of rod shaped molecules aligned. These nematic compounds have crystalline arrangement of molucules,yet they flow like a liquid and hence termed as liquid crystal display. •In following figure, two conductors defines a pixel position. Normally the molecules are aligned as shown in the “On State” Transparent Conductor Nematic Liquid crystal •Polarized light passing through the material is twisted so that it will pass through the opposite polarizer. •The light is then reflected back to the viewer. To turn off the pixel, apply a voltage to the two intersecting conductor to align Polarizer the molecules so that light is not Transparent conductor On State twisted.
  • 38. •Primitive Operations:- •Most of graphics systems provide basic set of graphic primitive commands. •Graphic primitives are the functions that we use to draw actual lines and the characters that make up the picture. These functions provide convenient method to application programmer for describing pictures. Basic three main primitive functions are: •Move to(x,y):- It used to set the current beam position to (x,y). It moves beam from previous current position to (x,y) position without drawing line. •Line to(x,y):- It used to draws line from current beam position to the point (x,y). •Draw text(s):- It used to displays the string „s‟ with its lower left corner at current beam position and reset current beam position to string‟s lower right corner.
  • 39. •Display file Interpreter:- •In raster scan display image information stored in frame buffer. Here frame buffer stores intensity values of all pixel on screen. Whereas in vector refresh display only line commands necessary to make picture are stored. These line commands are stored in file is called display file. • Picture image is firstly stored in display file in form of commands and then some program executes these commands and convert these commands in to actual picture is called display file interpreter, and it serves as interface between graphics program and display device.. User Program Interpreter Display file Display File Fig:- Display file Interpreter
  • 40. •Display file Structure:- • Display file contains series of commands required to draw a required picture. These commands are made up of two parts as- • i) Operation code(op code) :- Op code identifies what type of command it is and operands provide co-ordinates of pint(x,y) to process command. Each command needs three array to store itself in display file. First Array (DF-OP[ ]) stores op code, second array (DF- X[ ] ) stores x co-ordinate and third array (DF- Y [ ]) stores y- co-ordinate of a point. For eg. DF-OP[3], DF- X[3] and DF-Y[3]. Before starting to write a series of commands we shall assign come op codes to commands. We consider here only two commands LINE and MOVE. Lets define OP code 1 for MOVE and 2 for LINE. •ii) Operands. DF-OP DF-X DF-Y 1 3 3 2 3 3 1 10 10 2 10 10 Fig:- Display file Structure
  • 41. •Graphics File Format:- 1. TIFF( Tagged Image File Format): it is a flexible,adaptable file format for handling images and data within a single file, by including the header tags (size definition etc.) defining the image‟s geometry. • A TIFF file also include a vector-based clipping path (outlines,cropping,image frames). • A TIFF file a useful image archive,because,unlike standard JPEG files, a TIFF file using lossless compression may be edited and re-saved without losing image quality. • A TIFF file is a sequences of 8 bit bytes where bytes are numbered from 0 to N. • Advantage:- 1) it is platform independent 2) It is independent of computer system also. • 3) It is versatile and flexible. 4) It supports many compression schemes. 5) It supports additional information about images. • Disadvantage:- 1) It does not support multiple images in one file. 2) Complex file format. 3) It is open ended format, hence programmer can make changes
  • 42. 2) PCX: •It is developed by ZSOFT for its PC Paintbrush program. PCX is a widely used format for storing images. •It is graphics file format for graphics programs running on PC‟s. It is supported by most optical scanners, fax programs, and desktop publishing systems. Files in the PCX format end with a “.pcx” •The PCX is a device-independent raster image format. The file header stores information about the display hardware(screen resolution, color depth and palette information. Etc.) separately from the actual image information, allowing the image to be properly transferred and displayed on computer systems with diff. hardware. •Advantages:- It is most widely used bitmap image format. •Disadvantage:- 1)It has no provision for gray scale image.2) No provision for any colour made other than RGB. 3) does not support other platform.
  • 43. 2) JPEG (Joint Photographic Expert (Group): •Image files that employ JPEG compression are commonly called “JPEG files”. •JPEG is a lossy compression techniques in which some amount of data is lost. •Lossy compression technologies attempt to eliminate redundant or unnecessary information although it can reduce file sizes to about 5 % of their normal size, some detail is lost in the compression. •JPEG/JFIF is the format most used for storing and transmitting photographic on the world wide web. For this application, JPEG/JFIF is far superior to GIF. •The JPEG compression algorithm is not as well suited for line drawings and other textual or iconic graphics. •Advantages:- 1) suitable for photographic images.2) Reduces file size •Disadvantage:- 1) Some information of image is lost.
  • 44. 2) GIF(Graphic Interchange Format): •It is simple, memory efficient and back bitmap format. •It can be used with most bitmap editing programs. It compresses BMP files to much smaller size. •It sotres Image and other relevant information in sequence of blocks and sub blocks where each sub-block has diff function regarding image information, colour, brightness and data compression. •This GIF allows high-quality,high-resolution graphics to be displayed on a variety of graphics h/w and is intended as an exchange and display mechanism for graphics images. •Advantages:- 1) It gives compact file format.2) provids the option to specify how many colours should be saved. 3) allows multiple image to be stored in a single file. 4) suitable and are popular in Internet and Intranet. 5) It is device independent. 6) It is operating System Independent. •Disadvantage:- 1)Decompression of GIF data is slow.2) It uses only palette colour. 3) It do not provide other RGB colour and Gray scale.
  • 45. 2) BMP (Bitmap): •It is default format used by MS- windows. Here, storing and manipulation of pixels is done with their location and attributes by bit coding method. •In this information is stored in Device-Independent- Bitmap format. •Information can be displayed on any display device. It uses BMP as default fill extension. •The default filename extension of windows DIB file is BMP. •BMP Structure:- It Contains a bitmap-file header, a bitmap-information header, a colour table, and an array of bytes that defines the bitmap bits. BITMAPFILEHEADER bmfh; BITMAPINFOHEADER bmih; RGBQUAD aColors[ ]; BYTE aBitmapBits[ ]; •Advantages:- 1) Simple to use. 2) It is display device independent. •Disadvantage:- 1). Large file size 2) though display device independent they are limited to window platform. 3) can not store multiple images in one file.
  • 46. •Co –ordinate System:- •In 2D any point is address by it x & y co- ordinates like fig a. where x co-ordinate is 1. Cartesian co-ordinate system:- distance of point from origin measured along x direction and y co-ordinate is distance of a point y from origin measured along y direction & where x & Y are perpendicular to each other. •In 3D Any point is addressed by its x,y,z co ordinates as fig. b. p •Here in 2D & 3 D a line joining origin O to point P a radius vector. x o y y p x p o x z
  • 47. • Polar Co –ordinate System:- 1.:- 900 1350 450 00 1800 2250 2700
  • 48. We will meet Next Chapter Line Circle And Polygon You can give Feedback to me:- kparth.jadhav@gmail.com