Computer Graphics Introduction Introduction Computer Graphics It involves

  • Slides: 31
Download presentation
Computer Graphics Introduction

Computer Graphics Introduction

Introduction • Computer Graphics : It involves display manipulation and storage of pictures and

Introduction • Computer Graphics : It involves display manipulation and storage of pictures and experimental data for proper visualization using a computer. • Typically graphics system comprises of the host computers with support of – – – – 2/24/2021 fast processor, large memory, frame buffer display devices, input devices, output devices interface devices. Gaurav Raj, Lovely Professional University, Punjab 2

Conceptual Framework for Interactive Graphics Input Devices Application Model Application Program Graphics System Output

Conceptual Framework for Interactive Graphics Input Devices Application Model Application Program Graphics System Output devices 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 3

Typical Application Areas • • • • GUI Plotting in business Office Automation Desktop

Typical Application Areas • • • • GUI Plotting in business Office Automation Desktop Publishing Plotting in Science and Technology Web/Commercial/Business publishing and advertisements CAD/CAM Design(VLSI, Construction, Circuits) Scientific visualization Entertainment Simulation and Simulation Study Cartography Multimedia Virtual reality Process monitoring Digital Image processing Education and Training 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 4

GUI – Graphics User Interface • Typical Component used– Menus – Icons – Cursors

GUI – Graphics User Interface • Typical Component used– Menus – Icons – Cursors – Dialog Boxes – Scroll Bars – Buttons – Valuators – Grids – 3 -D Interfaces 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 5

Application Packages • Various application package and standards available – Core Graphics – GKS

Application Packages • Various application package and standards available – Core Graphics – GKS – SRGP – PHIGS, SPHIGS and PEX 3 D – Open. GL(With Active. X and Direct 3 D) – X 11 Based Systems 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 6

 • GKS- Graphics Kernel System – Developed by ISO and ANSI • SRGP-

• GKS- Graphics Kernel System – Developed by ISO and ANSI • SRGP- Simple Raster Graphics Package • PHIGS- Programmers Hierarchical Intaractive Graphics Systems – Various tools and utilities available for web based design include – JAVA, XML, VRML and GIF Animators – Certain compilers with their own graphics libraries, API support and help for programming 2 D/3 D graphics. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 7

Display • A graphics display is a drawing area comprised of an array of

Display • A graphics display is a drawing area comprised of an array of fine points called pixels (picture elements). • At the heart of a graphics system there is a magic pen, – move at lightning speed to a specific pixel – draw the pixel with a specific color — a red, green, and blue (RGB) vector value. – Computer graphics is about using this pen automatically through programming. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 8

Object, Model, and Image • A real or imaginary object is represented in a

Object, Model, and Image • A real or imaginary object is represented in a computer as a model, and is displayed as an image. • A model is an abstract description of the object’s shape (vertices) and attributes (colors), – which can be used to find all the points on the object corresponding to the pixels in the drawing area. – Given a model, the application program will control the pen through a graphics library to generate the corresponding image. • An image is simply a 2 D array of pixels. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 9

Primitive and Graphics Library • A graphics library provides a set of graphics commands

Primitive and Graphics Library • A graphics library provides a set of graphics commands or functions. – bound in C, Java, or other programming languages on different platforms. – specify primitive 2 D and 3 D geometric models to be digitized and displayed. • Primitive models or simply primitives stand for some simple shapes (such as points, lines, and polygons) • Open. GL is a graphics library; Direct. X includes a graphics library Direct 3 D 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 10

Brief History • 1963 Evan Sutherland’s seminal doctoral work “Sketchpad: a manmachine graphical communication

Brief History • 1963 Evan Sutherland’s seminal doctoral work “Sketchpad: a manmachine graphical communication system” • 1977 3 D Core Graphics System by ACM SIGGRAPH Committee • 1980’s, hardware expensive & graphics app. programs were few • 1985 GKS (the Graphical Kernel System), 2 D • 1987 MIT’s X lib for windows under UNIX OS • 1988 GKS-3 D, PHIGS (ANSI and ISO standard); SGI’s GL; • 1993 Open. GL (Open standard from SGI) • Since then, Open. GL supported on PC, MAC, Sun work-stations, SGI work-stations, special purpose image generators (ESIG) • Since then, Evolution of advanced GUI’s and graphics environments; Software from low-level, device dependent packages to higher-level device-independent packages • 2003 JOGL – Java for Open. GL from Sunmicrosystem 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 11

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 12

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 12

Cathode Ray Tube (CRT) 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 13

Cathode Ray Tube (CRT) 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 13

Color CRT 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 14

Color CRT 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 14

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 15

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 15

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 16

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 16

Type of CRT Display Devices 1. DVST (Direct View Storage Tube) 2. Calligraphic or

Type of CRT Display Devices 1. DVST (Direct View Storage Tube) 2. Calligraphic or Random Scan Display System 3. Refresh and Raster Scan Display System DVST(Direct View Storage Tube) 1. 2. 3. 4. 5. 6. 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. 7. Limited interactive support. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 17

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 18

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 18

Phosphor Coated Screen 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 19

Phosphor Coated Screen 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 19

DVST- Drawbacks • Modifying any part of the image requires redrawing the entire image.

DVST- Drawbacks • Modifying any part of the image requires redrawing the entire image. • Change in the image requires to generate new charge distribution in the DVST. • Slow process of drawing- typically a few seconds are necessary for a complex image. • Erasing takes approx. 0. 5 second. All lines and character must be erased. • No animation possible with DVST. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 20

Calligraphic or Random Scan Display System • Also called vector , stroke, line drawing

Calligraphic or Random Scan Display System • Also called vector , stroke, line drawing displays. • Characters are also made of sequence of strokes (or short lines) • Vectored – Electron beam deflected from end- point to endpoint. • Random Scan - Order of deflection is dictated by the arbitrary order of the display commands. • Phosphor has short persistence – delay in 10 -100 micro seconds 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 21

Calligraphic or Random Scan Display System • Display must be refreshed at regular interval

Calligraphic or Random Scan Display System • Display must be refreshed at regular interval minimum of 30 Hz(fps) for flicker free display. • Refresh Buffer- Memory space allocated to store the display list or display program for the display processor to draw the image. • 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. • Display program has the commands for point, line and character plotting. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 22

Conceptual Block Diagram Calligraphic Refresh Display I 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab

Conceptual Block Diagram Calligraphic Refresh Display I 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 23

Conceptual Block Diagram Calligraphic Refresh Display II 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab

Conceptual Block Diagram Calligraphic Refresh Display II 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 24

Calligraphic or Random Scan Display System • The Display processor sends digital and point

Calligraphic or Random Scan Display System • The Display processor sends digital and point coordinate values to the vector display. • The vector generator converts the digital coordinate values to analog voltages for the beam deflection circuits. • The Beam deflection circuits displays the electron beam for writing on the CRT’s phosphor coating. • Recommended refresh rate is 40 -50 Hz. • Scope of animation with segmentation mixture of static and dynamic parts of the picture. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 25

RASTER DISPLAYS • Store the primitives in a famebuffer, or refresh buffer which is

RASTER DISPLAYS • Store the primitives in a famebuffer, or refresh buffer which is RAM with 1024*1280, or V*H addressable pixels. • Bitmap – array of 1/0 (pixels) • Pixmap- array of gray-scale pixels • Monocrome – Bi-level • Gray Scale – multiple level(1 -15) • Color – (R, G, B) • Scan-Conversion(rasterization ) – Objects are converted into discrete pixels in frame buffer. • Aliasing – Jagging or Stair casing of lines/ edges • Anti-Aliasing - Dealing with aliasing • Resolution - # of distingushable lines per inch 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 26

LASER PRINTER (HARD COPY DISPLAY DEVICE) Framebuffer CRT (CATHODE RAY TUBE) 2/24/2021 Gaurav Raj,

LASER PRINTER (HARD COPY DISPLAY DEVICE) Framebuffer CRT (CATHODE RAY TUBE) 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 27

RASTER DISPLAY SYSTEMS Graphics Card (Video Card) • Graphics card: handle scan-conversion and other

RASTER DISPLAY SYSTEMS Graphics Card (Video Card) • Graphics card: handle scan-conversion and other advanced graphics functions 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 28

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 29

2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 29

 • Frame Buffer(Bit Planes) : RAM with the generated pixmap and attribute ready

• Frame Buffer(Bit Planes) : RAM with the generated pixmap and attribute ready to display. • Video Controller : refresh the display. • Interlacing (bitmaps), a method of incrementally displaying raster graphics • Interlaced: fine as long as adjacent scan lines display similar information • # of bits for color : Direct(RGB Mode) and indirect(Index Mode) 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 30

Interlacing • A method of encoding a bitmap image such that a person who

Interlacing • A method of encoding a bitmap image such that a person who has partially received it sees a degraded copy of the entire image. • When communicating over a slow communications link, this is often preferable. • Interlacing is supported by the following formats, where it is optional: – GIF interlacing stores the lines in the order 0, 8, 16, . . . (8 n), 4, 12, . . . (8 n+4), 2, 6, 10, 14, . . . (4 n+2), 1, 3, 5, 7, 9, . . . (2 n+1). – PNG uses the Adam 7 algorithm, which interlaces in both the vertical and horizontal direction. – JPEG, JPEG 2000, and JPEG XR (actually using a frequency decomposition hierarchy rather than interlacing of pixel values) – PGF (also using a frequency decomposition) • Interlacing is also known as "progressive" encoding, because the image becomes progressively clearer as it is received. This terminology is different than the interlaced and progressive scan terminology of video encoding. 2/24/2021 Gaurav Raj, Lovely Professional University, Punjab 31