Unit - 1
Unit - 1
ELECTIVE - COMPUTER
GRAPHICS
UNIT – 1
INTRODUCTION:
Computer Graphics is a picture that is generated by a computer. Computer Graphics is the discipline of
producing picture or images using a computer. This includes modelling – creation, manipulation, and storage
of geometric objects and rendering - converting a scene to an image, or the process of transformations,
shading, illumination, and animation of the image.
Definition: It is the use of computers to create and manipulate pictures on a display device. It comprises of
software techniques to create, store, modify, represent pictures.
We find computer graphics used in the areas as science, engineering, medicine, business, industry,
government, art, entertainment, advertising, education, and training.
History of Computer Graphics:
1. In the 1950’s, the first computer driven display was used to generate simple pictures. This display used Cathode Ray Tube
(CRT). Using dark and light characters, a picture can be reproduced. 1950 Ben Laposky created the first graphic images,
an Oscilloscope generated by an electronic machine. The image was produced by manipulating electronic beams and
recording them onto high – speed film.
2. In the 1960’s, beginnings of modern interactive graphics, output are vector graphics and interactive graphics. One of the
worst problems was the cost and inaccessibility of machines. 1960 William Fetter coins the computer graphics to describe
new design methods.
3. In the early 1970’s, output start using raster displays, graphics capability was still fairly chunky.
4. In the 1980’s, output are built-in raster graphics, bitmap image and pixel. Personal computers cost decrease drastically,
trackball and mouse become the standard interactive devices.
5. In the 1990’s, since the introduction of VGA, and SVGA, personal computer could easily display photo – realistic images
and movies. 3D image renderings became the main advancement and it simulated cinematic graphics applications.
Applications of Computer Graphics:
2. Presentation Graphics
3. Computer – Art
4. Entertainment
6. Information Visualization
7. Image Processing
8. Information Graphics
9. Virtual Reality
1. Computer-Aided Design: Designing buildings, automobiles, and aircraft is done with the help of computer-
aided drawing, this helps in providing minute details to the drawing and producing more accurate and sharp
drawings with better specifications.
2. Presentation Graphics: For the preparation of reports or summarising the financial, statistical, mathematical,
scientific, and economic data for research reports, and managerial reports, moreover creation of bar graphs, pie
charts, and time charts, can be done using the tools present in computer graphics.
3. Computer Art: Using computer graphics we can create fine and commercial art which includes animation
packages, and paint packages. These packages provide facilities for designing object shapes and specifying object
motion. Cartoon drawings, paintings, and logo designs can also be done.
4. Entertainment: Computer graphics find a major part of its utility in the movie industry and game industry. Used
for creating motion pictures, music videos, television shows, and cartoon animation films. In the game industry
where focus and interactivity are the key players, computer graphics help in efficiently providing such features.
5. Education: Computer-generated models are extremely useful for teaching huge number of concepts and
fundamentals in an easy-to-understand and learn manner. Using computer graphics many educational models can
be created through which more interest can be generated among the students regarding the subject.
Training: Specialised systems for training like simulators can be used for training the candidates in a way that can
be grasped in a short span of time with better understanding. The creation of training modules using computer
graphics is simple and very useful.
6. Information Visualization: Today the need of visualize things have increased drastically, the need of
visualization can be seen in many advanced technologies, data visualization helps in finding insights into the data,
to check and study the behavior of processes around us we need appropriate visualization which can be achieved
through proper usage of computer graphics.
7. Image Processing: Various kinds of photographs or images require editing in order to be used in different
places. Processing of existing images into refined ones for better interpretation is one of the many applications of
computer graphics.
8. Information Graphics: Information Graphics or infographics are graphic visual representation of information,
data or knowledge. These graphics present complex information quickly and clearly, such as signs, maps,
journalism, technical writing and education. With an information graphic, computer scientists, mathematicians,
and statisticians develop and communicate concepts using a single symbol to process information. Traffic signs
and other public signs rely heavily on information graphics.
9. Virtual Reality (VR): It is a term that applies to computer – simulated environments that can simulate places in
real world, as well as in imaginary worlds. They are the visual experiences, displayed either on a computer screen
or through special stereoscopic displays, but some simulations include additional sensory information, such as
sound through speakers or headphones.
Computer Graphics Classification: It can be categorized into variety of ways. They are:
1. Type of object (dimensionality): The object can be represented graphically as abstract or real. The picture range of possible
combination can be 2 – D and 3 – D type.
3-D type of object can be line drawing with various effects, shading, color image with various effects.
2. Type of interaction: It determines the user’s degree of control over the object and its image.
Interactive Plotting: The user controls the supply of parameters, real time animation fir flight simulators.
3. Role of picture: It is the degree to which the picture is an end in itself or is a means to end.
Example: Drafting, raster painting, animation and artwork the drawing is the end product.
4. Relationship between objects and their pictures: The user may deal with only one picture with a time (plotting) or with a
sequence of related pictures, or with a collection of objects (as in CAD applications).
Graphics Software: It is program or a collection of programs that enable a person to manipulate visual images
on a computer.
1. General Programming Packages: Are used in high – level programming language. They use a set of
graphics functions to generate picture components like straight lines, polygons, circles and other figures.
2. Special Purpose / Application Packages: Are designed for non – programmers, so that users can generate
displays without worrying how the graphics operation works.
Example: Photoshop, Paint Shop Pro, Corel DRAW, Microsoft Paint etc.
Graphics software is used in many aspects of life and business. It is mainly used for editing and sharing digital
photos, creating logos, drawing and modifying clip art, creating digital fine art, Web Graphics, designing
advertisements etc.
WORKING OF INTERACTIVE DISPLAY: It consists of three components:
Frame Buffer or Digital Memory
Display Controller or Video Controller
Television Monitor
1. Frame Buffer: In the frame buffer the displayed image is stored as a matrix of intensity values.
2. Display Controller: A special purpose processor called display controller is used to control the operation of the display
device. The display controller is used to pass the contents of the frame buffer to the monitor. The image must be passed
repeatedly to the monitor 30 or more times a second, in order to maintain a steady picture on the screen.
In the frame buffer the image is stored as a pattern of binary digital numbers, which represent a rectangular array of pixels. In
a black and white image, we can represent black pixel as 1’s and white pixel as 0’s in the frame buffer.
The display controller reads the byte of data from the frame buffer and converts its 0’s and 1’s into corresponding video signal.
Then the signal is transferred to the TV monitor, producing a black and white pattern on the screen.
There are two problems in drawing curved and straight lines on a graphic display:
2. Slanting lines and curves in the image will be far from smooth and will instead show unpleasant staircase effect
The first problem is solved by using a procedure or algorithm, that computes which pixel should be black from the equation of the
line or curve.
The second problem i.e., the staircase effect in the picture is solved by using a different sort of display, called a line drawing
display, which plots continuous lines and curves rather than separate pixels.
Speed is important in displaying pictures. Any display based on CRT must be refreshed at least 60 times a second. The image must
be transmitted to the display point by point. Until the entire image is transmitted, it will be flickering. Pictures can be made to
grow, shrink, rotate by applying the transformations, based on mathematical techniques: coordinate geometry, trigonometry, and
matrix methods.
Note: To create pictures directly on display screen, a number of different input devices – light pen, tablet, and mouse can be used.
Cathode Ray Tube (CRT): A cathode ray tube is a vacuum tube in which images are produced when an electron beam strikes
a phosphor coated surface.
The electron gun generates a beam of electrons, which passes through focusing and deflection system that direct the beam
towards specified positions on the phosphor – coated screen. The phosphor then emits a small spot of light at each position
contacted by the electron beam, the light emitted by the phosphor fades very rapidly. Some method is needed for maintaining
the screen picture. One way to keep the phosphor glow is to redraw the picture repeatedly by quickly directing the electron
beam over the same points. This type of display is known as refresh CRT.
CRT Functioning: A cathode ray tube consists of several basic components:
Heating Metal / Filament
Cathode
Control Grid
5. Refresh rate does not depend on the picture. 5. Refresh rate depends on resolution
7. Shadow mask technology came under this. 7. Beam Penetration technology come under it.
The deflection system of the CRT operates on all 3 electron beams simultaneously; the 3 electron beams are deflected and
focused as a group onto the shadow mask, which contains a sequence of holes aligned with the phosphor- dot patterns.
When the three beams pass through a hole in the shadow mask, they activate a dotted triangle, which occurs as a small color
spot on the screen.
The phosphor dots in the triangles are organized so that each electron beam can activate only its corresponding color dot when
it passes through the shadow mask.
Inline arrangement: Another configuration for the 3 electron guns is an Inline arrangement in which the 3 electron guns and
the corresponding red-green-blue color dots on the screen, are aligned along one scan line rather of in a triangular pattern.
This inline arrangement of electron guns in easier to keep in alignment and is commonly used in high-resolution color CRT's.
Advantages:
Realistic image
Million different colors to be generated
Shadow scenes are possible
Disadvantages:
Relatively expensive compared with the monochrome CRT.
Relatively poor resolution
Convergence Problem
OTHER DISPLAY TECHNOLOGIES: The most widely used display devices are:
Direct View Storage Tube (DVST)
Plasma Panel
Flat Panel Display
Liquid Crystal Displays (LCDs)
1. Direct View Storage Tube (DVST): DVST terminals also use the random scan approach to generate the image on the CRT
screen. The term "storage tube" refers to the ability of the screen to retain the image which has been projected against it, thus
avoiding the need to rewrite the image constantly. Two guns are used in DVST:
• Primary guns: It is used to store the picture pattern.
• Flood gun or Secondary gun: It is used to maintain picture display.
Advantage:
No refreshing is needed.
High Resolution
Cost is very less
Disadvantage:
It is not possible to erase the selected part of a picture.
It is not suitable for dynamic graphics applications.
If a part of picture is to modify, then time is consumed.
2. Flat Panel Display: The Flat-Panel display refers to a class of video devices that have reduced volume, weight and power
requirement compared to CRT.
Example: Small T.V. monitor, calculator, pocket video games, laptop computers, an advertisement board in elevator.
1. Emissive Display: The emissive displays are devices that convert electrical energy into light.
Examples are Plasma Panel, thin film electroluminescent display and LED (Light Emitting Diodes).
2. Non-Emissive Display: The Non-Emissive displays use optical effects to convert sunlight or light from some other source
into graphics patterns.
Examples are LCD (Liquid Crystal Device).
3. Plasma Panel: The first plasma displays available were technically televisions because they did not have TV tuners. The
television tuner is the device that converts a television signal from a cable wire or any other means into a video image. Since
the plasma displays lacked tuners, they were used as simple monitors that display a standard video signal. Recent
developments have made inbuilt digital television tuners. Plasma Display Panel is an emissive display which means that the
panel itself is the light source. In comparison to a transmissive display, where the light source is separate and light is passed
through the panel to create an image, PDPs are extremely bright and light-tolerant flat panel display technology that utilizes a
gas discharge principle thus also known as gas discharge display.
Plasma gives a big display screen length which degrees normally from 42” to 63”. It works properly in dimly lit rooms
tremendous for looking movies, gives excessive assessment ratios, gorgeously saturated shades, and permits for extensive
viewing angles each seat inside the residence is a tremendous one.
Because it can track fast-moving images without motion blur, plasma is ideal for watching action-packed sports or playing
video games.
1. Raster – Scan Display Processor: The raster scan system is a combination of some processing units. It consists of the
control processing unit (CPU) and a particular processor called a display controller. Display Controller controls the operation
of the display device. It is also called a video controller.
A major task of the display processor:
Digitizing a picture definition given in an application program into a set of pixel – intensity values for storage in the frame
buffer.
The function generates various line styles, displaying color areas, and performing certain transformations and
manipulations on displayed objects.
A fixed area of the system memory is reversed for the frame buffer and the video controller is given direct access to the
frame buffer memory.
Frame buffer locations and the corresponding screen positions are referenced in cartesian coordinates.
Display processors are typically designed to interface with interactive input devices such as a mouse.
2. Random – Scan Display Processor: Input in the form of an application program is stored in the system memory along with
graphics package. Graphics package translates the graphic commands in application program into a display file stored in
system memory. This display file is then accessed by the display processor to refresh the screen. The display processor cycles
through each command in the display file program. Sometimes the display processor in a random-scan is referred as Display
Processing Unit / Graphics Controller. The structure of a simple random scan is shown below:
INSTRUCTION SET: In order to provide a flicker free display, the display processor must execute its program 30 to 60
times per second because there is no pixmap (pixmap is for multiple – bit – per – pixel system). Since pixel map refers to the
contents of the refresh buffer and to the buffer memory itself.
The display processing unit (DPU) or graphics controller has an instruction set and instruction address register, which goes
through the classic instruction fetch, decode and execute cycle found in any computer.
COLOR MAPPING:
A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically
as three or four values or color components. A color model is a specification of a 3 – D coordinate system.
Each primary color can take an intensity value ranging from 0(lowest) to 1(highest). Mixing these three primary colors at
different intensity levels produces a variety of colors. The collection of all the colors obtained by such a linear combination of
red, green and blue forms the cube shaped RGB color space.
2. CMY COLOR MODEL: The CMY color model use a subtraction process and this concept is used in the printer.
In CMY model, we begin with white and take away the appropriate primary components to yield a desired color.
Example: If we subtract red from white, what remains consists of green and blue which is cyan. The coordinate system of
CMY model use the three primaries’ complementary colors: C(cyan) M(magenta) and Y(yellow)
The corner of the CMY color cube that is at (0, 0, 0) corresponds to white, whereas the corner of the cube that is at (1, 1, 1)
represents black.
3. YIQ MODEL: This is the color model used by U.S. Commercial Color Television Broadcasting. It is a recoding of RGB
for transmission efficiency and for downward compatibility for black & white television.
The YUV color space is derived from the RGB space. It comprises the luminance (Y) and two colors (U, V) components. The
luminance can be computed as a weighted sum of red, green and blue components. The color difference or chrominance
components are formed by subtracting luminance from blue and from red.