Sie sind auf Seite 1von 47

Computer Graphics

Introduction to Computer Graphics

Computer Graphics involves display, manipulation, storage of pictures and experimental data for proper visualization using a computer. Typical graphics system comprises of a host computer with support of fast processor, large memory, frame buffer and

- Display devices (color monitors) - I/P devices (mouse, keyboard, touch panels, joystick, trackball, etc) -O/P devices (LCD panels, laser printers, color printers,etc) - Interfacing devices.

Conceptual Framework of interactive graphics

Application Model

Application Program

Graphics System

Monitor

Keyboard

Continue ...
CG Systems could be Active and Passive In both cases, the I/p to the system is the scene description and O/p is a static or animated scene to be displayed In case of Active system, the user controls the display with the help of GUI, using I/P device.

Typical Application areas are :

GUI (Graphical User Interface) :

Various components are Menus, icons, cursors, dialog boxes, scroll bars, buttons, sketching, 3D interface

Plotting in business, science & technology Office automation Web/business/commercial publishing & advertisement. CAD/CAM design (VLSI, Construction, Circuits) Scientific Visualization Entertainment

Continue ...

Cartography Virtual reality Digital Image Processing Education and Training

Continue ...
Computer Aided Design (CAD)

Continue ...

Continue ...
Presentation Graphics :

Continue ...
Computer Art :

Continue ...

Continue ...
Entertainment :

Continue ...

Continue ...
Visualization :

Continue ...
Education and Training :

Continue ...
Image Processing :

Application Packages ...

Core Graphics GKS (Graphical Kernel System) by ISO, ANSI SRGP (Simple Raster Graphics Package) PHIGS (Programmers Hierarchical Interactive Graphics System), SPHIGS OpenGL X11 based systems

Output Primitives
4 basic O/P primitives for drawing pictures:

Polyline Filled polygons(regions) Ellipse (arc) Raster Image

Display System Transformation: Affine(2D and 3D), Viewing Scan Conversion and Clipping Hidden Surface Removal Shading and illumination Curves and Surfaces Solid Modeling Animation, Pipeline & parallel architectures, hybrid architectures

Some terms ...


Persistence : The time it takes the emitted light from the screen to decay to one-tenth of its original intensity. Resolution : The maximum number of points that can be displayed without overlap on a CRT. Aspect Ratio : This numbers gives the ratio of vertical points to horizontal points necessary to produce equal length lines in both directions on the screen.

References

Computer Graphics: Principles and Practice;

J.Foley, A. Van Dam, Feiner & Hughes, Addison Wesley

CG using OpenGL; F.S. Hill Jr., Pearson Education CG C version; D. Hearn & M.P . Baker, Pearson Education OpenGL Guide, Red Book

OpenGL Program
void mydisplay(void) { glClear(GL_COLOR_BUFFER_BIT);//clear screen glBegin(GL_POINTS); //draw points glVertex2i(100,50); glVertex2i(100,130); glVertex2i(150,130); glEnd(); glFlush();//send all output to display }

OpenGL Program
void main(int argc, char **argv) { glutInit(&argc,argv); //initialize the toolkit glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); //display mode glutInitWindowSize(640,480); //window size glutInitWindowPosition(100,150); //window position on screen glutCreateWindow("My First OpenGL Program");//open the screen glutDisplayFunc(mydisplay);//register the redraw function glClearColor(0.0,0.0,0.0,0.0);//background color, black glColor3f(1.0f,1.0f,1.0f);//drawing color gluOrtho2D(0.0,640.0,0.0,480.0); glutMainLoop();// go into a perpetual loop }

Examples of Computer Graphics Devices:


CRT, EGA/CGA/VGA/SVGA monitors, plotters, data matrix, laser printers, Films, flat panel devices, Video digitizers, scanners, LCD panels, keyboard, joystick, mouse, touch screen, track ball, etc.

The most commonly used display device is the CRT monitor

Types of Display Devices


Calligraphic or Random Scan display system Refresh and raster scan display system DVST (Direct View Storage Tube)

Direct View Storage Tube (DVST)


Storage Tube it is a CRT with a long persistence
phosphor Provides flicker-free display, No refreshing necessary A slow moving electron beam draws a line on the screen Screen has a storage mesh in which the phosphor is embedded Image is stored as a distribution of charges on the inside surface of the screen Limited interactive support

Drawbacks of DVST
Modifying any part of the image requires redrawing
the entire modified image Change in the image requires to generate a new charge distribution in the DVST Slow process of drawing typically a few seconds are necessary for a complex picture Erasing takes about 0.5 seconds. All lines and characters must be erased. No animation possible with DVST DVBST (Direct View Bistable Storage Tube) Another version is "dark trace" CRT also known as the Skiatron

Cathode Ray Tube (CRT)


Electron Guns Electron Beams Focusing Coils Deflection Coils Anode Connection Shadow Mask Phosphor layer Close-up of the phosphor coated inner side of the screen

Continue ...

Electron Gun

Deflection Systems
One pair of plates is mounted horizontally to control the vertical deflection, and the other pair is mounted vertically to control horizontal deflection.

Resolution of a CRT is dependent on:


The type of phosphor The intensity to be displayed The focusing and deflection system

Conceptual block diagram

Host CPU

Display Buffer

Display Controller

CRT

Vector/ Character generator

Picture Processor

Random Scan System

Continue ...
Refresh Buffer memory space allocated to store the display list or display program for the display processor to draw the picture Picture definition is now stored as a line-drawing commands an area of memory referred to as refresh display file. The display processor interprets the commands in the refresh buffer for plotting. The display processor must cycle through the display list to refresh the phosphor. The display program has commands for point, line, and character plotting. The display must be refreshed at regular intervals minimum of 30 Hz (fps) for flicker-free display.

Continue ...

The display processor sends digital and point coordinate values to a vector generator The vector generator converts the digital coordinate values to analog voltages for the beam-deflection circuits The beam-deflection circuits displace the electron beam for writing on the CRTs phosphor coating Refresh rate depends on the number of lines to be displayed. Recommended refresh rate is 40 50 Hz. Random scan displays are designed for line-drawing applications and can not display realistic shaded scenes. Random scan displays have higher resolution than raster systems.

Raster Scan System


Unlike DVST and random-scan which were linedrawing devices, refresh CRT is a point-plotting device Raster displays store the display primitives (lines, characters, shaded and patterned areas) in a refresh buffer Refresh buffer (also called frame buffer) stores the drawing primitives in terms of points and pixels components Entire screen is a matrix of pixels Each pixel brightness can be controlled

Continue ...
Refresh buffer can be visualized as a set of horizontal raster lines or a row of individual pixels Each point is an addressable point in screen and memory Line cannot be drawn directly from one point to another This causes the effect of aliasing, jaggies or staircase effect Raster is stored as a matrix of pixels representing the entire screen area Entire image is scanned out sequentially by the video controller (one raster line at a time)

Continue ...

In a raster scan system, the electron beam is swept across the screen, one row at a time from top to bottom. As the electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots. The intensity of the beam decides the brightness of the pixel Refreshing on raster scan displays is carried out at the rate 60 to 80 frame per second.

Raster Scan System

Continue ...

Basic video-controller refresh operations

Continue ...

On some raster systems , each frame is displays in two passes using an interlaced refresh procedure. On an older, 30 frame per-second, noninterlaced display, some flicker is noticeable. The quality of a raster image is determined by the total number pixels (resolution), and the amount of information in each pixel (color depth).

Color CRT Monitors


A CRT monitor displays color pictures by using a combination of phosphors that emit different color lights. Two Methods are used, Beam Penetration Method Shadow Mask Method

Beam Penetration Method


Two layers of phosphor (red and green) are coated onto the inside of the CRT screen. The display color depends on how far the electron beam penetrates into the phosphor layers. Beam-acceleration voltage used. Used with random scan display.

Das könnte Ihnen auch gefallen