graphics lab lab18112

Post on 24-Oct-2014

52 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

COMPUTER GRAPHICS Mutimedia Lab

S8 CSE

Computer Graphics is concerned with generation , representation ,manipulation and display of pictures – using computerComputer Graphics is divided to three areas:- (1).Generative Graphics-Creation of 2D & 3D pictures from Mathematical rep of objects Eg: Graphs & pictures, Animations , CAD etc

INTRODUCTION

(2) .Cognitive Graphics – deals with Algorithms to Gen & Classify pictures Eg:Classification of thumb prints, faces, photos etc

(3). Image Processing–Cleaning up blurred images & Generating clear pictures.

Eg: processing blurred picts and genr clear picts

• We will deal with HW/SW aspects of generative graphics :-

Display devices…• Most common device –Cathode ray

tube(CRT)• Consists of an evacuated glass tube

enclosing a source of electrons ,an electrode to accelerate the electrons, a focusing system to narrow the

beam, horizontal & vertical deflection system and a phosphor coated screen

Simplified diagram of a CRT

Colour Displays

Uses shadow mask technique Inside CRT’s viewing surface is coated with three different phosphors The three phosphors are coated as patterns of three dots or triads over the entire screen. Each of the three phosphors emits a differentcolour, red, green & blue (RGB) when beam hitsThe dots are so near & the colours merge into one and so different colours are obtained .

Shadow mask colour CRT

The individual phosphors in the triads are independently struck by three beam of electrons

The three beams are also arranged as a triad

and are deflected synchronously and focused

A shadow mask, is placed in front of the tube

surface .

• The mask has one small hole aligned at each triad position on the screen

• By controlling the acceleration voltages intensity of the beams are changed to produce , a range of colours .

• The number of lines varies from 480 to 1000 depending upon the cost of the VDU

Overview of Display method• A graphic Picture is written to draw the picture using the primitives of graphic

language or using functions in a language like C. The primitives are to draw - a point, a

line, circle, arc, ellipse, etc Eg: To draw the picture as shown below, one may write graphic instructions as

follows :-

Display method Contd…

• Draw_poly(x0,y0;x1,y1;x2,y2;x3,y3;x4,y4)• Draw_line(x1,y1;x2,y2)• Draw_line(x2,y2;x3,y3)• Draw_circle(x5,y5;R)• The values x1,y1,..,R etc will be given in coordinate system by the user ,,, and picture

will be drawn as shown …

Almost all current displays are raster scan displays.

In these the electron beam of the CRT sweeps from the left to right of the screen ,returns to the next line and the process repeated to cover the entire screen.

The beam produces a flicker free display.

There is another type of display called Random Scan display :--

in which points are plotted by

applying appropriate voltages to X & Y

deflection systems of a CRT, similar to

drawing in a plotter.

This is very expensive compared to raster scan system and is not in extensive use now .

Principle of a raster scan Display

Scan converted picture to a set of pixels

• Interactive Graphics –

• consists of a Display Unit, A Display file memory, Display Processing Unit & a GUI input unit

• Cathode Ray Tube – Similar to Home TV to display computer generated pictures Pictures should be repeatedly displayed 30 to 60 times per second-for a flicker free

picture. Block schematics is shown below..

Block Diagram of an interactive computer graphics

Types of displays…• Colour CRT• Direct View Storage Tubes ( DVST)• Flat Panel Displays• Liquid Crystal Displays (LCD)

Graphics Standards

• ISO (International Standards Orgn) • ANSI (American National Standards Institute)• PHIGS (The Programmer’s Hierarchical • Interactive Graphics Package)• GKS (Graphical Kernel Systems ) – is both an

ISO & ANSI standard)

Applications of computer Graphics• Computer is an essential and powerful

tool for effective & economical presentation of pictures

• Computer Graphics-Wide usage /applications

Engg, Medicine, business,industry, Gvt, art, cinema advertisement, education etc

Typical Applications/Uses• Computer Aided Design(CAD)-used for

product design , building, Automobiles , aircraft, space craft, testing, PCB’s etc

• Animations/simulations – before actual production

• CAD/CAM-manufacturing items after design

• Presentation Graphics- Produce illustration for reports,

transparancies/films for projection • Statistical,scientific,mathematical data

presetn• Multidimensional graphics,pie chart, bar

chart..• Computer art- for fine arts /commercial

applications• Simulators- flight/ship /automobile

simulators…

• Entertainment-making motion pictures,videos, television ….

• Education/training- teaching s/w packages

• Simulators- flight/ship /automobile simulators

• Image processing – To modify or interpret existing pictures/images to improve picture quality and for medical applns

• Tomography-a technique of X-ray photography that allows cross sectional views of systems

• Visualization –Analyze huge data and study behavior of systems/processes

Graphics and Multimedia Lab Cycle 1• Implement Line drawing using DDA• Implement Line Using Bresenham’s

Algorithm• Implement circle drawing using

Bresenham’s Algorithm• Use a Circle using mid point Algorithm

Cycle 2• Implement line clipping• Implement line transformations Translation, rotation and scaling• Implement Polygon clipping

Cycle 3

• Implement Benzier curve for a given set of control points

• Implement Polygon filling using flood fill algorithm

• Implement polygon filling using boundary fill algorithm

Cycle 4

• Simulate a car movement • Simulate a dynamic solar system• simulate a leaky bucket• Simulate a man jumping from a parachute

…. etc

Cycle 5• Familiarization with multimedia tools Photo shop, Macromedia flash, dream

waver ,Power point etc

Typical Questions…..

Best Wishes…….. Thank U

top related