0% found this document useful (0 votes)
765 views29 pages

Unit 1 CG Notes

This document provides an introduction and overview of key concepts in computer graphics. It discusses images and objects, pixels and resolution, text mode vs graphics mode, and the basic graphics pipeline. It also covers display devices, output primitives like lines and polygons, graphics functions and standards, and latest trends such as virtual and augmented reality. The document defines important terms related to computer graphics and provides examples to illustrate concepts like bitmap and vector graphics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
765 views29 pages

Unit 1 CG Notes

This document provides an introduction and overview of key concepts in computer graphics. It discusses images and objects, pixels and resolution, text mode vs graphics mode, and the basic graphics pipeline. It also covers display devices, output primitives like lines and polygons, graphics functions and standards, and latest trends such as virtual and augmented reality. The document defines important terms related to computer graphics and provides examples to illustrate concepts like bitmap and vector graphics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Unit 1: basics of computer graphics

Sub topics:
1. Images and objects , pixels and resolution , Text Mode and Graphics mode ,
Basic graphics pipeline , Bitmap and vector based graphics , applications of CG.
2. Display devices , Raster scan display , Random scan Display , Flat panel display ,
LED , LCD Display , plasma , touch screen .
3. Output primitives: line , polygon , marker , text .
4. Graphics function and standards
5. Latest trends in computer graphics: virtual reality , augmented reality.

Introduction:
Computer graphics is an art of drawing pictures ,lines,circle,charts etc.using computers with the help of
programming.

The computer is an information processing machine. graphical objects convey more information in less
time.

So,using computers we can display the information to the users in the form of graphical objects such as
pictures,graphs,charts etc.

Computer graphics involve display, manipulation and storage of pictures for proper visualization by
using computer.

Definition:
“Computer graphics is a field of computer science that is concerned with digitally synthesizing and
manipulating visual contents.”

Computer graphics

Interactive CGs non-interactive CGs

Image is under the control of user image is not under the control of user.

Eg . playing game on computer eg . movies.

Computer graphics is the study of techniques to improve communication between human and
machines.

Here ,computer represents the data provided to it in pictorial form.

Prepared by Miss. D. H. Kumbhar Page 1


Unit 1: basics of computer graphics

Computer graphics allows communication through pictures,charts,diagrams”thousand words can be


replaced by single picture”.

1 . 1 Image:
“An image is a representation of an object on a computer.”

an image is a visual representation of something.

Image is an optical or other representation of a real object .a graphic , a picture.

An image is a picture that has been created or copied and stored in electronic form.

An image can be described in terms of vector graphics and raster graphics.

It can take different forms.

An image may be an actual picture display , a page stored in a video memory , or a source code
obtained from a program.

An image is a primarily symbolic visual representation other than a text.

Objects:
Object is a thing that has physical existance.

Object is an entity (person,bucket,tree)that can be customizzed using propertise like color ,length,and
behavior(animation schemes).

“objects are real entities defined in three dimentional(3D)world co-ordinates.

An image is a 2D description of a 3D object.

Computer graphics deal with both 2D and 3D descriptions of an object that performs transformations
generating visual displays.

These transformations may be directly performed on object co-ordinates or image co-ordinates.

Object manipulation gives a better flexibility for generalization at the cost of complexity of operation

Pixels:
A pixel is the smallest piece of information in an image.

Pixels are often represented using dots or squares.

Prepared by Miss. D. H. Kumbhar Page 2


Unit 1: basics of computer graphics

“ In computer graphics , pictures are represented as a collection of discrete picture element called as
pixels.”

A pixel the is a smallest addressable screen element.

Each pixel is a sample of an original image, where more samples typically provide a more accurate
representation of the originals.

Rasterization:
“the process of determining the appropriate pixels for representing pictures or objects is called as
rasterization”.

Scan conversion :
The process of representing continuous pictures as a graphical object is called as scan conversion.

Resolution:
Resolution is the number of pixels contained on a display monitor, expressed in terms of the number of
pixels on the horizontal axis and the number of pixels on the vertical axis.

The resolution can be defined in many ways.such as pixel resolution ,spatial resolution,temporal
resolution ,spectral resolution.

Pixel resolution:

In pixel resolution ,the term resolution refers to the total number of counts of pixels in a digital
image.for example if an image has m rows and n columns then its resolution can be m*n.

Eg.800*600

1200*400

1 . 2 Modes of resolution:
Many video adapters support several different modes of resolution.

1 .Text mode/character mode

2. Graphics mode

1. Text mode:
A video mode in which a display screen is divided into rows and columns of boxes .

Each box contain one character.

Prepared by Miss. D. H. Kumbhar Page 3


Unit 1: basics of computer graphics

All video standards for the PC ,including VGA ,supports a text mode that divides the screen into 25
rows and 80 columns.

Display screen is treated as an array of blacks,each of which can hold one ASCII character.

25 rows

80 columns

Graphics modes:
 In addition to text mode,most video adapters support a graphics mode,in which the display
screen is divided into an array of pixels.
 Each pixel has a name or address,so that we can uniquely indentify that.
 Computer graphics images are made by setting the intensity and color of pixels.
 Programs that run entirely in graphics mode called graphics based programs.
 Characters and other shapes are formed by turning a combination of pixels.

……………………………
……………………………
…………………………… 480
……………………………
...

640

Fig .graphics mode

 programs that run in graphics mode can display an unlimited variety of shapes and fonts.
 Whereas programs running in text mode are severely limited.

Prepared by Miss. D. H. Kumbhar Page 4


Unit 1: basics of computer graphics

1.3 Basic graphics pipeline:


A graphics pipeline can be divided into three main parts:

Application stage

Geometry stage

Rasterization

application geometry rasterization

graphics pipeline or rendering pipeline defines the primitive operations required for mapping
3D scenes on a 2D screen.

OpenGL and Direct 3D are two notable graphic pipeline model.

1. Application stage:
• At this stage user interacts with the scene and alters it as per his requirements . These changes
must be reflected with the screen.
• The new scenes with its primitive shape like a point , line , triangles are passed to the
next stage.
• Application stage mostly performs the collision , detection , morphing , animation ,
quadtree or octree generation. It helps to reduce memory requirements.

2. Geometry stage:

Prepared by Miss. D. H. Kumbhar Page 5


Unit 1: basics of computer graphics

Model and camera transformation:

a. Objects are first created in world coordinates with their actual dimensions.
b. Required objects are placed in the world co ordinate system.
c. Camera position is determined in a world co ordinate system , which determines the
view of placed objects.

Lightning:

Appropriate light sources are considered to illuminate the scene.

Projection:

Parallel or perspective projection transforms the 3D scene from the real world to 2D
representation as per the camera viewing direction.

Clipping:

The real world scene which is outside the clipping window will be rejected to reduce the
further computation.

Window viewport transformation:

The projected and the clipped scene is then mapped to the desired device or display device.

Window to viewport transformation does this mapping.

3. Raserization:
• Each object is first converted into triangles via the process called tessellation.
• In the later stage , triangles are converted into the smallest fragments called pixels.
• Entire continuous scene is drawn in a discrete form on a monitor through the process of
rasterization.
• Color of the pixel is determined by the light source , viewing directions , object material
property etc.
• Finally output is merged and displayed on the monitor.

1 . 4 Bitmap and vector based graphics:

Bitmap based graphics:


 It is also called as raster graphics.
 It is created from rows of different colored pixels that together form an image.

Prepared by Miss. D. H. Kumbhar Page 6


Unit 1: basics of computer graphics

 It contains information about color of each pixel.


 In simplest form it have two color black and white, with increasing complexity an image can
include more colors.

Eg. Bitmap graphics formats:

Gif,jpeg,png,pcx as well as bitmap fonts

 The image displayed on a computer monitor is also a bitmap as are the outputs of
printers,scanners and similar devices.

Vector based graphics:


 Vector based graphics also known as “object-oriented “graphics.
 These are constructed using mathematical formulas describing shapes , colors,placements.
 A vector graphic consists of shapes,curves,lines and text which together make a picture.
 A vector graphics contains instructions about where to place each of the components.
 It is possible to embed bitmap graphic within vector graphic.
 Eg; VG formats PICT,EPS,WMF,postscript and true type fonts.
 These are created with GIS and CAD application as well as drawing programs like freehand.
 “SVG” scalable vector graphics is a language for describing vector graphics in XML.
 With SVG you can code graphics directly into an XML document.
 Not appropriate for complex images.

Eg. Digitized photographs.

1 . 5 Applications of computer graphics:


Computer graphics is being used in such diverse field as:

1. Presentation graphics
2. 2 . Entertainment
3. 3 . Education and training
4. 4 . Computer aided design(CAD)
5. Drawing and art
6. 6.communication
7. 7.Image processing
8. 8.Graphical user interface (GUI)

Prepared by Miss. D. H. Kumbhar Page 7


Unit 1: basics of computer graphics

1.Presentation graphics:

It deals with graphical representation of information.

It commonly used to summarize financial,statistical,mathematical,scientific and economic data for


research reports,managerial reports and other types of reports.

Eg . bar charts,line graphs,surface graphs,pie charts etc.

2.Entertainment:

 Computer graphics methods are used in making music videos,television shows,games,cartoon


movies etc.
 Several developers have used graphics , sound,animation of multimedia to create variety of
games.

Eg. Drive cars, fly aircrafts,play any musical instrument.

 Nowdays, computers are being used to create realistic special effects through digital imaging,
animation ,morphing,replacement and background sound.

Morphing:

Is a graphical technique in which one object is transformed into another in such a way that the
change appears to be smooth and not rapid.

Eg. Advertisement , movie(terminator)

Animation:

 When motion is provided to an object which is not in existence, it is known as animation.


 Motion should appear like real life and not artificial.

Eg. Cartoon movies

3. Education and learning:

 A software “Bodyworks” is used to teach the anatomy to the medical students .


 This Software covers all the details of the human body and also shows it diagramatically.
 Even pilots are first trained through flight simulators and only after practicing there, they are
allowed to move to an actual aircraft.

Prepared by Miss. D. H. Kumbhar Page 8


Unit 1: basics of computer graphics

4. CAD (Computer Aided Design):

 Major use of computer graphics is in design processes for engineering and architectural systems.
 CAD is used in the design of buildings,automobiles,aircraft,watercraft,spacecraft,textiles etc.
 Real time animations are useful for testing performance of a vehicle or system.
 Circuits, networks for communications,water supply are constructed with repeated placement
of a few graphical shapes.

5 Drawing and art:

 This field requires you to find your own artistic vision.


 Artists use a variety of computer methods that provide facilities for designing object shapes and
specifying object motions.
 Eg.Paint programs, animation packages.

6. Communication:

 With videoconferencing two people or more than two people can communicate with each other
without being physically present at a common place.
 Reduces pollution as unnecessary travel eliminated.
 Eg. Email

7.Image processing:

 It applies techniques to modify or interpret existing pictures such as photographs and TV scans.
 Two principal applications of image processing are:

-Improving picture quality.

-Machine perception of visual information as used in robotics.

8. Graphical user interface:

 A major component of graphical interface is a window manager that allows a user to display
multiple window areas.
 Each window contain different process that can contain graphical or non graphical displays.
 Interface also display menus, icons for fast selection of processing options or parameter values.
 Eg.Adobe photoshop .

Prepared by Miss. D. H. Kumbhar Page 9


Unit 1: basics of computer graphics

2.Graphics devices :
 Although early applications in engineering and science had to rely on expensive equipment ,
recent advances in computer technology have made interactive computer graphics a practical
tool.
 Computer graphics started with the display of data on hardcopy plotters and cathode ray tube
(CRT) screens .
 Since then it has grown to include the creation , storage and manipulation of models and images
of objects.
 Computer graphics today is largely interactive.
 The user controls thee contents , structure and appearance of objects and their displayed
images by using input devices , such as keyboard , mouse or any touch sensitive panels on the
screen .
 Because of the close relationship between the input devices and display , the handling of such
devices is included in the study of computer graphics .
 Computer devices can be divided into two major categories :
1. Hardware components
2. Display system

1 . Hardware components :
The hardware components with which the user interacts to generate necessary instructions for the
creation of required graphics.

Hardcopy output devices :

 We can obtain hard copy output for our images in several formats .
 For presentation we can send images files to device or service bureaus that will produce slide.
 To put images on film ,we can simply photograph a scene displayed on a video monitor and we
can put our pictures on paper by directing graphics output to a printer or plotters.
 The quality of the pictures obtained from a device depends on dot size and the number of dots
per inch or lines per inch.

Printers :
 To produce smooth characters in printed text strings higher quality printers shift dot positions
so that adjacent dots overlap.
 Printers produce output by either impact or non impact mathods.
 Impact printers press formed character faces against on inked ribben onto the paper.
 Eg. Line printer.
 Non impact printers and plotters use laser technique , ink jet sprays to get images on the paper.

Prepared by Miss. D. H. Kumbhar Page 10


Unit 1: basics of computer graphics

 Dot matrix print head containing a rectangular array of procruding wire pins , with the number
of pins depending on the quality of printer.
 Individual characters or graphic patterns are obtained by retracting certain pins so that the
remaining pins from the pattern to be printed.

Input devices:
Keyboard:

 A standard known as American standard code for information interchange (ASCII) has been
developed to allow computers to encode keyboard characters.
 The keyboard is an efficient device for inputting non graphic data as picture labels associated
with a graphics display.
 Cursor control keys and function keys are common features of general purpose keyboards.
 Function keys allows user to enter frequently used operations in a single keystoke.
 Cursor control key can be used to select displayed objects or co ordinate positions by
positioning the screen cursor.
 Numeric keypad included for fast entry of numeric data.

Mouse:

 It is a small hand operated box with two or three buttons on the top and a ball or roller at its
bottom.
 There is a cursor in the shape of an arrow always associated with a mouse.
 The Potentiometer attached to the ball estimates the relative positions of the mouse.

Trackball :

 Ball can be rotated with the fingers or palm of the hand to produce screen cursor movement.
 The potentiometer attached to the ball , measures the amount and directions of rotation.

Spaceball :

 It provides six degrees of freedom.


 It does not actually move.
 Strain gauge measures the amount of pressure applied to the space ball to provide input for
special positioning and orientation as the ball is pushed or pulled in various directions.
 Spaceball used for 3D positioning and selection operations in virtual reality systems, modeling ,
animation , CAD and other applications.

Joystick :

 A joysticks consist of a small vertical lever(stick)mounted on the base to steer the screen cursor
around.

Prepared by Miss. D. H. Kumbhar Page 11


Unit 1: basics of computer graphics

 The distance that the stick is moved in any direction from its center position corresponds to
screen cursor movement in that direction.
 Potentiometer mounted at the base of the joystick measures the amount of movement and
springs return the stick to the center position when it is released.

Data glove:

 Is a device to interact with animated artificial objects.


 You wear a glove fitted with sensors and electrical wires hooked to a compatible computer.
 As you rotate or move your hand and manipulate your fingers , you can see the same on the
monitor.

Digitizers :

 A common device for drawing , painting or interactively selecting co-ordinate positions on an


object is a digitizer.
 These devices can be used to input coordinate values in either a two dimensional or a three
dimensional space.
 Typically, a digitizer is used to scan over a drawing or object and to input a set of discrete
coordinates positions, which can be joined by straight line segments to approximate the curve
or surface shapes.

Image scanner :

 Drawings ,graphs , color or black and white photos or text can be stored for computer
processing with an image scanner by passing an optical scanning mechanism over the
information to be stored.
 The gradation of gray scale or color are then recorded and stored in an array.
 Once we have the internal representation of a picture , we can apply transformations to rotate ,
scale or crop the picture to a particular screen area.

Light pen :

 It is pencil shaped device used to select screen positions by detecting the light coming from
points on the CRT screen.
 An activated light pen , pointed at a spot on the screen as the electron beam lights up the spot ,
generates an electrical pulse that causes the co ordinate position of the electron beam to be
recorded.
 As with cursor positioning devices , recorded light pen co ordinates can be used to position an
object or to select a processing option.

Disadvantages :

 As part of the screen image is obscured by the hand , light pen can cause arm fatigue.

Prepared by Miss. D. H. Kumbhar Page 12


Unit 1: basics of computer graphics

 It cannot detect positions within black areas.


 Due to background lightning in room light pen sometimes give false readings.

Voice system:

 Speech recognizers are used in some graphics workstations as input devices to accept voice
commands.
 The voice system input can be used to initiate graphics operations or to enter data.
 These systems operate by matching an input against a predefined dictionary of words and
phrases.

Touch panel:
 Touch panel allows displayed objects or screen positions to be selected with the touch of a
finger
 A typical application of touch panels is for the selection of processing options that are
represented with graphical icons.
 Touch input can be recorded using optical , electrical or acoustical methods.
 Optical touch panel:

 Optical touch panels employ a line of infrared light emitting diodes(LED’s) along one vertical
edge and along one horizontal edge of the frame.
 The opposite vertical and horizontal edges contain light detecters.
 These light detecters are used to record which beams are interrupted when the panel is
touched.
 The two crossing beams that are interrupted identify the horizontal and vertical co ordinates of
the screen position , selected positions can be selected with an accuracy of about ¼”.

Prepared by Miss. D. H. Kumbhar Page 13


Unit 1: basics of computer graphics

 With closely spaced LED’s , it is possible to break two horizontal or two vertical beams
simultaneously.
 In this case , an average position of between the two interrupted beams is recorded.
 The LED’s operate at infrared frequencies ,so that the light is not visible to a user.

Advantages:

1. Highest image quality.

2. Unlimited touch life.

3. Impervious to surface scratches.

Disadvantages:

• Accidental activation may occur.

• Sensitive to water , snow , rain.

• Dust , oil or grease buildup on screen could impede light beam causing malfunction.

Electrical touch panel:

 An electrical touch panel is constructed with two transparent plates separated by a small
distance.
 One of the plates is coated with a conducting material and the other plate is coated with a
resistive material.
 When the outer plate is touched , it is forced into contact with the inner plate.
 These contact creates a voltage drop across the resistive plate that is converted to the co
ordinate values of the selected screen positions.

Advantages:

Prepared by Miss. D. H. Kumbhar Page 14


Unit 1: basics of computer graphics

1. Can be activated with virtually any object.

2. Has tactile feel.

3. Lowest cost touch technology.

4. Lower power consumption.

Disadvantages:

1. Lower image clarity compared to other touch technology.

2. Outer polyester film is vulnerable to damage from scratching , Poking , sharp object

Acoustical touch panel :

 In acoustical touch panels , high frequency sound waves are generated in horizontal and vertical
directions across a glass plate.
 Touching the screen causes part of each wave to be reflected from the finger to the emitters.
 The screen position at the point of contact is calculated from a measurement of the time
interval between the transmission of each wave and its reflection to the emitter.

Advantages:

1. Excellent image clarity.

2. High touch life.

3. Even better scratch resistive than capacitive

Prepared by Miss. D. H. Kumbhar Page 15


Unit 1: basics of computer graphics

Disadvantages:

1. Will not activate with hard items (pen , credit cards).

2. Water droplet may cause false reading.

2.2 Display systems:


 Display systems where the graphics are rendered in the console screen of the computer.

 The primary output device in a graphic system is a video monitor.

 Operations of most video monitors is based on standard cathode ray tube.(CRT).

There are two types of video monitors:

Monochrome display monitor

Color display monitor

Let us first see the monochrome display monitor(Black and white)

It mainly consists a cathode ray tube(CRT)along with related circuits.

The CRT is a vaccum glass tube with the display screen at one end and connectors to the control circuits
at other end.

Phosphor is coated on the inside of the display screen which emits lights for a period of time when hit by
a beam of electrons.

The color of light and time period vary from one type of phosphor to another.

Prepared by Miss. D. H. Kumbhar Page 16


Unit 1: basics of computer graphics

The light given off by the phosphor during exposure to the electron beam. The continuing glow given off
after the beam is removed .

Opposite to phosphor coated screen i.e. on other end there is an electron gun which is heated to send
our electrons.

The electrons are regulated by the control electrode and forced by the focusing electrode into a narrow.

Beam striking the phosphor coating at small spots. When this electron beam passes through the
horizontal and vertical deflection plates , it is bent or deflected by the electric field between the plates.

The horizontal plate controls the beam to scan from left to right and retrace from right to left.

The vertical plates control the beam to go from the first scan line at the top to the last scan line at the
bottom and retrace from the bottom back to the top.

These actions are synchronized by the control circuits so that the electron beam strike each and every
pixel position in a scan line by scan line fashion.

Color display monitor:

In color display there are 3 electron guns instead of one with one electron gun for each primary color.

The phosphor coating on the inside of the display screen consists of dot patterns of three different types
of phosphors.

These phosphors are capable of emitting Red,Green,Blue light.

The distance between the center of dot patterns is called the pitch of the color CRT. A thin metal screen
called a shadow mask is placed between the coating and electron guns.

Prepared by Miss. D. H. Kumbhar Page 17


Unit 1: basics of computer graphics

The tiny holes on the shadow mask constrain each electron beam to hit its corresponding phosphor
dots.When viewed from a certain distance,light emitted by the 3 types of phosphors blends together to
give us a broad range of colors.

Raster scan display:


 In raster scan electron beam follows a fixed path.
 The electron beam starts at top left corner of the screen and moves horizontally to the right
defines scan line.
 During the scan line the intensity of the beam is modulated according to the pattern of the
desired image along the line.
 At the right corner of the screen , the beam becomes off and moved back to the left edge of the
screen at the starting point on next line , shown as dotted line called as horizontal retrace.
 This way of scanning is continued till the bottom right corner is reached at this point one scan is
completed.
 The beam is then repositioned at the top left corner of the screen for starting another scan.
 This movement of beam from bottom right corner to top left corner is called as vertical retrace.

Fig. raster scan display

Random scan :

 Display devices with random scan operate by directing the electron beam to only those parts of
the screen where the picture is to be drawn.
 This is also called as vector graphics.
 This vector graphics depends on the ability of hardware to generate line vectors.
 Creation of diagrams using vector graphics becomes easier , so can be used in engineering and
scientific drawings , where as the raster graphics can be used in animation.
 In random scan pen plotters and direct storage view tube(DVST) devices are used.
 Whereas in raster scan cathode ray tube (CRT) are used.
 Since , the cost of devices used for random scan much higher than the cost of devices for raster
scan , people are using raster scan devices heavily.

Prepared by Miss. D. H. Kumbhar Page 18


Unit 1: basics of computer graphics

 For random scan the host system generates a display file graphics commands which is executed
by the display processor.
 The display processor then just reads the frame buffer and turns electron beams on or off.

Advantages of random scan :

 Very high resolution limited only by monitor


 Easy animation ,just draw at different position
 Requires less memory.

Disadvantages:

 Requires intelligent electron beam that is processor controller.


 Limited screen density before have flicker , cant draw complex image.
 Limited color capability .

Flat panel display :


 The term flat panel display refers to a class of video devices that have reduced volume , weight
and power requirements compared to a CRT .
 A significant feature of flat panel display is that they are thinner than CRT and we can hang them
on walls .
 Since we can even write on some flat panel displays , they will soon be available as pocket
notepads.
 Current uses for flat panel displays include small TV monitors , calculators , pocket video games
laptop , computers , armrest viewing of movies on airlines.
 We can divide it in two categories.

1. Emissive displays (emitters)

2. Non –Emissive displays (non –emitters)

1 . Emissive displays :

 Emissive displays are devices that convert electrical energy into light.
 Eg .plasma panel , thin film electroluminescent displays , light emitting diodes.
 Flat CRTs have also been devised , in which electron beams are accelerated parallel to the
screen , then deflected 90 degree to the screen , but flat CRTs have not proved to be as
successful as other emissive devices.

2 . Non-emissive displays :

 Uses optical effects to convert sunlight or light from some other source into graphics patterns.
 Eg .LCD (liquid crystal device)

Prepared by Miss. D. H. Kumbhar Page 19


Unit 1: basics of computer graphics

Plasma panel :
 A display device which stores the image but allows selective erasing is the plasma panel.
 Is also called as gas discharge displays , because it contains a neon gas at a low pressure
sandwiched between horizontal and vertical grids of fine wires.
 A large voltage difference between a horizontal and vertical wire will cause the gas to glow as it
does in a neon street sign.
 A lower voltage will not start a glow but will maintain a glow once started.
 Normally the wires have this low voltage between them.
 To set a pixel , the voltage is increased momentarily on the wires that intersect the desired
point.
 To make pixel off , the voltage on the corresponding wires is reduced until the glow cannot be
maintained.
 Plasma panels are very durable and are often used in military application.

Advantages:

 Large screen size is also possible.

 Less volume.

 Less weight.

 Flicker free display.

Disadvantages:

 Wiring requirement anode and cathode is complex.

 Its addressing is also complex.

Prepared by Miss. D. H. Kumbhar Page 20


Unit 1: basics of computer graphics

LED (Light Emitting Diode) :


 Another type of emissive device is LED .
 The matrix of diodes is arranged to form the pixel positions in the display and picture definition
is stored in a refresh buffer.
 As in scan line refreshing of CRT , information is read from the refresh buffer and converted to
voltage levels that are applied to the diodes to produce the light patterns in the display.

LCD ( Liquid crystal display) :


 Definition:

“ A liquid crystal display is a thin, flat display device made up of any number of pixels arrayed in front
of a light source or reflector.”

 -It uses very small amount of electric power , and is suitable for use in battery powered
electronic devices .
 Is a temperature dependent.0-70 degree Celsius .

Advantages:

• Low power consumption.

• Small size

• Low cost

Disadvantages:

• Temperature dependent.

• Does not emit light

Prepared by Miss. D. H. Kumbhar Page 21


Unit 1: basics of computer graphics

Graphics function:
 A general purpose graphics packages provides user with variety of function for creating
and manipulating pictures.

 Input functions are used for control and process the various input device such as mouse
, tablet etc.

 Control operations are used to controlling and housekeeping tasks such as clearing
display screen etc.

 All such inbuilt functions which we can use for our purpose are known as graphic
function.

 1.initgraph():-

It is used to initialise graphics mode.


 Syntax :

 initgraph(int driver,int mode,char path);

Prepared by Miss. D. H. Kumbhar Page 22


Unit 1: basics of computer graphics

 2. closegraph():-

It is used to close graphics mode.

 Syntax :

closegraph();

lineto():

syntax:

lineto(endx,endy);

line():

used to draw line on the screen.

syntax :

line(x1,y1,x2,y2);

Eg. line(100,100,200,200);

circle():

syntax:

circle(x,y,radius);

Eg. circle(100,100,50);

rectangle():

Syntax:

rectangle(x1,y1,x2,y3);

ellipse():

Syntax:

ellipse(x,y,starting angle,ending angle,x radius ,y radius);

Input 1: x=250, y=200, start_angle = 0, end_angle = 360, x_rad = 100, y_rad = 50

Prepared by Miss. D. H. Kumbhar Page 23


Unit 1: basics of computer graphics

Input 2 : x=250, y=200, start_angle = 0, end_angle = 180, x_rad = 80, y_rad = 150

drawpoly():

Syntax:

void drawpoly( int number, int *polypoints );

where, number indicates (n + 1) number of points where n is the number of vertices in a


polygon. polypoints points to a sequence of (n*2) integers.

Input : arr[] = {120, 250, 400, 250, 400, 350, 450, 200, 120, 250};

Graphics functions for color:

setcolor():

used to set color of the objects.

Syntax:

setcolor(COLOR);

Prepared by Miss. D. H. Kumbhar Page 24


Unit 1: basics of computer graphics

Eg. setcolor(RED);

setlinestyle():

used to set the current line style , width and pattern.

Syntax :

setlinestyle(linestyle , pattern , thickness);

Eg. setlinestyle(SOLID_LINE,1,2);

setfillstyle():

void setfillstyle(int pattern, int color);

Eg. pattern = HATCH_FILL, Color = RED

Graphics standards :
 A good computer graphics system includes good software as well as a compatible
hardware.

 Both computer graphics vendors as well as users identified some needs to have some
graphics standards.

 The needs are as follows:

1.software portability

2.Image data portability

3.Text data portability

Prepared by Miss. D. H. Kumbhar Page 25


Unit 1: basics of computer graphics

4.Model database portability

Standards for computer graphics :


 CORE(core of a computer graphics)

 GKS(graphics kernel system)

 IGES(initial graphics exchange specification)

 PHIGS(programmers hierarchical interactive graphics system)

 CGM(computer graphics metafile)

 CGI(computer graphics interface)

CORE :
 Provides standardized set of commands to control construction and display of graphics
images.

 Commands are independent of the device and language.

 Core system defines basic graphics primitives from which more complex or special
purpose graphics routines could be built.

 Program written for the core system could be run on any installation using that system.

 Core system contained mechanisms for describing and displaying both 2D and 3D
structures.

GKS(Graphical Kernel system):


 This system was adopted as a first graphics software standard by the international
standard organization(ISO) and various national standard organization including ANSI.
 GKS was originally designed as the two dimensional graphics package and then later
extension was developed for three dimensions.

Prepared by Miss. D. H. Kumbhar Page 26


Unit 1: basics of computer graphics

IGES (initial graphics exchange specification) :


 It is standard for the exchange of model databases among CAD/CAM systems.

 It defines the format for engineering drawing that can be read or written by
applications.

 It allows graphical engineering databases to be transferred between applications .

PHIGS (Programmers Hierarchical Interactive Graphic Standard);


 Its an extension of GKS .Increased capability for object modeling , color specifications ,
surface rendering and picture manipulation are provided in PHIGS.
 Extension of PHIGS called ”PHIGS+”.It is developed to provide 3D surface shading
capabilities which are not available in PHIGS .

CGM(computer graphics metafile) :


 Is a machine and operating system independent interchange format that provides
elements to represent geometric graphics and raster graphics.

 Metafile is a display file which contains compact description of the image.

 Is the only standard fro graphical database specification designed to serve a wide range
of applications.

 Is a static picture capture metafile.

 3 standardized encodings:

binary encoding-local storage archive

character encoding-character for interchange

clear text encoding- development and debugging of applications.

CGI(computer graphics interface) :


 The CGI specifies the set of functions for basic control and data exchange between the
device independent and device dependent levels of the graphics system.

Prepared by Miss. D. H. Kumbhar Page 27


Unit 1: basics of computer graphics

 CGI defines the syntax and semantics of the set of elements which can be exchanged
across the virtual device interface.

Graphics standards :

 Advantages:
 can upgrade the graphics equipment .

 user can select graphics hardware according to the needs.

 a wider range of application programs is possible.

 application programs transportation from one computer to another becomes very


easy.

 graphics standard helps to train programmers who use interactive graphics

 Disadvantages:
 There is no fixed graphics standards available and applicable to all application programs.

 since every application is not having device independence property there is a lot of
problem to frame a standard.

 poor definition od standards may lead to create certain problems for users.

 once standards are defined, it is difficult to accommodate new changes in it.

Virtual reality :
Virtual reality is the system which prodeuce images in such way that we feel that our
surrounding is what we are set in display devices but in actually it does not.

In virtual reality user step into a scene and interact with the environment.

A head set containing an optical system to generate the stereoscopic views is


commonly used in conjunction with interactive input devices to locate and manipulate
objects in the scene.

Prepared by Miss. D. H. Kumbhar Page 28


Unit 1: basics of computer graphics

Examples:

1. Military

2. Mental health

3. Medical training

4.education

Augmented reality:
Is the real time use of information in the form of text,graphics,audio and other virtual
enhancements integrated with real world objects.

Its an rendering of digital images or data onto real world objects.

An artificial environment created through the combination of real world and computer
generated data.

Exapmles:

Google glass

Pokemon go

Disney coloring book

Drive virtual car

Prepared by Miss. D. H. Kumbhar Page 29

You might also like