Introduction to Computer Graphics - Prof. eskululu, Assignments of Compiler Design

What is computer Graphics? Computer graphics is an art of drawing pictures, lines, charts, etc. using computers with the help of programming. Computer graphics image is made up of number of pixels. Pixel is the smallest addressable graphical unit represented on the computer

Typology: Assignments

2020/2021

Uploaded on 05/27/2021

esku-lulu
esku-lulu 🇬🇧

9 documents

1 / 45

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Samara University
College of Engineering and Technology
Department of Computer Science
Computer Graphics(CoSc3121)
Chapter One
Introduction to Computer Graphics
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d

Partial preview of the text

Download Introduction to Computer Graphics - Prof. eskululu and more Assignments Compiler Design in PDF only on Docsity!

Samara University

College of Engineering and Technology

Department of Computer Science

Computer Graphics(CoSc3121)

Chapter One

Introduction to Computer Graphics

What is computer Graphics?

Computer graphics is an art of drawing pictures, lines, charts, etc. using computers with the help of programming. Computer graphics image is made up of number of pixels. Pixel is the smallest addressable graphical unit represented on the computer screen.

 Computer is information processing machine. User needs to communicate with computer and the computer graphics is one of the most effective and commonly used ways of communication with the user.  It displays the information in the form of graphical objects such as pictures, charts, diagram and graphs.  Graphical objects convey more information in less time and easily understandable formats for example statically graph shown in stock exchange.  In computer graphics picture or graphics objects are presented as a collection of discrete pixels.  We can control intensity and color of pixel which decide how picture look like.  The special procedure determines which pixel will provide the best approximation to the desired picture or graphics object this process is known as Rasterization.  The process of representing continuous picture or graphics object as a collection of discrete pixels is called Scan Conversion.

Application of computer graphics…

Simulation and animation: - Use of graphics in simulation makes mathematic models

and mechanical systems more realistic and easy to study.

Art and commerce : - There are many tools provided by graphics which allows used to

make their picture animated and attracted which are used in advertising.

Process control : - Now a day’s automation is used which is graphically displayed on the

screen.

Cartography : - Computer graphics is also used to represent geographic maps, weather

maps, oceanographic charts etc.

Education and training : - Computer graphics can be used to generate models of

physical, financial and economic systems. These models can be used as educational aids.

Image processing : - It is used to process image by changing property of the image.

Display devices

 Display devices are also known as output devices.  Most commonly used output device in a graphics system is a video monitor.

A. Cathode Ray Tube

Fig. 1.1: - Cathode ray tube.

There are two techniques used for producing images on the CRT screen:

  1. Vector scan/Random scan display.
  2. Raster scan display.

1.Vector scan/Random scan display.

Fig. 1.2: - Architecture of a vector display.

 Vector scan display directly traces out only the desired lines on CRT.

 If we want line between point p1 & p2 then we directly drive the beam deflection circuitry

which focus beam directly from point p1 to p2.

 If we do not want to display line from p1 to p2 and just move then we can blank the beam

as we move it.

 To move the beam across the CRT, the information about both magnitude and direction is

required. This information is generated with the help of vector graphics generator.

 Fig. 1.2 shows architecture of vector display. It consists of display controller, CPU,

display buffer memory and CRT.

 Display controller is connected as an I/O peripheral to the CPU.

 Display buffer stores computer produced display list or display program.

2.Raster Scan Display

Fig. 1.3: - Architecture of a raster display.

 Fig. 1.3 shows the architecture of Raster display. It consists of display controller, CPU, video controller, refresh buffer, keyboard, mouse and CRT.  The display image is stored in the form of 1’s and 0’s in the refresh buffer.  The video controller reads this refresh buffer and produces the actual image on screen.  It will scan one line at a time from top to bottom & then back to the top.

OFF (^) ON Horizontal Retrace

Vertical Retrace

Fig. 1.4: - Raster scan CRT.

13

 In raster scan displays a special area of memory is dedicated to graphics only.

This memory is called Frame Buffer.

 Frame buffer holds set of intensity values for all the screen points.

 That intensity is retrieved from frame buffer and display on screen one row at a

time.

 Each screen point referred as pixel or Pel (Picture Element).

 Each pixel can be specified by its row and column numbers.

 It can be simply black and white system or color system.

 In simple black and white system each pixel is either ON or OFF, so only one bit

per pixel is needed.

 Additional bits are required when color and intensity variations can be displayed

up to 24-bits per pixel are included in high quality display systems.

 On a black and white system with one bit per pixel the frame buffer is commonly

called a Bitmap. And for systems with multiple bits per pixel, the frame buffer is often referred as a Pixmap.

Base of Difference Raster Scan System Random Scan System

Electron Beam The electron beam is swept across the screen, one row at a time, from top to bottom.

The electron beam is directed only to the parts of screen where a picture is to be drawn.

Resolution Its resolution is poor because raster system in contrast produces zigzag lines that are plotted as discrete point sets.

Its resolution is good because this system produces smooth lines drawings because CRT beam directly follows the line path.

Picture Definition Picture definition is stored as a set of intensity values for all screen points, called pixels in a refresh buffer area.

Picture definition is stored as a set of line drawing instructions in a display file.

Realistic Display The capability of this system to store intensity values for pixel makes it well suited for the realistic display of scenes contain shadow and color pattern.

These systems are designed for line- drawing and can’t display realistic shaded scenes.

Draw an Image Screen points/pixels are used to draw an image.

Mathematical functions are used to draw an image.

1. Beam-penetration technique

 This technique is used with random scan monitors.  In this technique inside of CRT coated with two phosphor layers usually red and green. The outer layer of red and inner layer of green phosphor.  The color depends on how far the electron beam penetrates into the phosphor layer.  A beam of fast electron penetrates more and excites inner green layer while slow electron excites outer red layer.  At intermediate beam speed we can produce combination of red and green lights which emit additional two colors orange and yellow.  The beam acceleration voltage controls the speed of the electrons and hence color of pixel.  It is a low cost technique to produce color in random scan monitors.  It can display only four colors.  Quality of picture is not good compared to other techniques.

2. Shadow Mask Technique

Fig. 1.6: - Shadow-mask CRT.

Direct-view storage tubes (DVST)

Fig. 1.7: - Direct-view storage tube.

Direct-view storage tubes (DVST)

 In raster scan display we do refreshing of the screen to maintain a screen image.  DVST gives alternative method for maintaining the screen image.  DVST uses the storage grid which stores the picture information as a charge distribution just behind the phosphor coated screen.  DVST consists two electron guns a primary gun and a flood gun.  A primary gun stores the picture pattern and the flood gun maintains the picture display.  A primary gun emits high speed electrons which strike on the storage grid to draw the picture pattern.  As electron beam strikes on the storage grid with high speed, it knocks out electrons from the storage grid keeping the net positive charge.  The knocked out electrons are attracted towards the collector.  The net positive charge on the storage grid is nothing but the picture pattern.  The continuous low speed electrons from flood gun pass through the control grid and are attracted to the positive charged area of the storage grid.  The low speed electrons then penetrate the storage grid and strike the phosphor coating without affecting the positive charge pattern on the storage grid.  During this process the collector just behind the storage grid smooth out the flow of flood electrons.