Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

1

CSE 403
COMPUTER
GRAPHICS
Professor Dr. Md Zahidul Islam
Dept of Computer Science and Engineering

Introduction
Introduction to COMPUTER
2
GRAPHICS
◻ Computer Graphics involves display, manipulation and
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),
• Input devices (mouse, keyboard, joystick, touch screen,
trackball)
• Output devices (LCD panels, laser printers, color printers.
Plotters etc.)
• Interfacing devices such as, video I/O, TV interface etc.
Conceptual framework for
3
interactive graphics
Typical applications areas
4

◻ GUI
◻ Office automation
◻ Plotting in business
◻ Desktop publishing
◻ Plotting in science and technology
◻ Web/business/commercial publishing and advertisements
◻ CAD/CAM design (VLSI, Construction, Circuits)
◻ Scientific Visualization
◻ Entertainment (movie, TV Advt., Games etc.)
◻ Simulation studies
GUI – Graphical User Interface
5

◻ Typical Components Used:


◻ • Menus
◻ • Icons
◻ • Cursors
◻ • Dialog Boxes
◻ • Scroll Bars
◻ • Buttons
◻ • Valuators
◻ • Grids
◻ • Sketching
Typical applications areas
6

◻ Cartography: for designing maps


◻ Simulators
◻ Multimedia
◻ Process Monitoring
◻ Digital Image Processing
◻ Education and Training
Various application packages and
7
standards are available
◻ • Core graphics
◻ • GKS
◻ • SRGP
◻ • PHIGS, SPHIGS and PEX 3D
◻ • OpenGL
◻ • X11-based system
8

◻ GKS – Graphics Kernel System


by ISO (International Standards Organization)
& ANSI (American National Standards Institute)
◻ SRGP – Simple Raster Graphics Package
◻ PHIGS – Programmers Hierarchical Interactive
Graphics System
◻ OpenGl
On various platforms, such as
9

◻ DOS
◻ Windows
◻ Linux
◻ OS/2
◻ SGI(silicon graphics system)
◻ SunOS
◻ Solaris
◻ HP-UX
◻ Mac
◻ DEC-OSF
Various utilities and tools available for
10
web-based design include
◻ Java, XML, VRML and GIF animators are good
tools for webpage design.
◻ Certain compilers, such as, Visual C/C++, Visual
Basic, Borland C/C++, Borland Pascal, Turbo C,
Turbo Pascal, Gnu C/C++, Java provide their own
graphical libraries, API, support and help for
programming 2-D/3-D graphics.
◻ Some of these systems are
• device-independent (X11, OpenGL )
• device-dependent (Solaris, HP-AGP ).
Four basic output primitives (or
11
elements) for drawing pictures
◻ POLYLINE
◻ Filled POLYGONS (regions)
◻ ELLIPSE (ARC)
◻ TEXT
◻ Raster Images
Four major areas of Computer
12
Graphics are
◻ • Display of information,
◻ • Design/Modeling,
◻ • Simulation and
◻ • User Interface (already discussed)
Active and Passive Systems
13

◻ Computer Graphics systems could be active or passive.


◻ In both cases, the input to the system is the scene
description and output is a static or animated scene to
be displayed.
◻ In case of active systems, the user controls the display
with the help of a GUI, using an input device.
◻ Computer Graphics is now-a-days, a significant
component of almost all systems and applications of
computers in every field of life.
Various fundamental concepts and
14
principles in Computer Graphics
◻ Display Systems
Storage displays, Random scan, Raster refresh
displays, CRT basics, video basics, Flat panel
displays.
◻ Transformations (for manipulating objects)

Affine ( 2-D and 3-D ): Rotation, Translation,


Scale, Reflection and Shear.
Viewing: The Camera Transformations
-perspective, orthographic, isometric and
stereographic views, Quaternion.
Various fundamental concepts and
15
principles in Computer Graphics
◻ Scan Conversion and Clipping
Drawing of Points, Lines, Markers, Curves, Circles,
Ellipse, Polyline, Polygon. Area filling, fill-style, fill
pattern, clipping algorithms, anti-aliasing etc.
◻ Hidden Surface Removal

Back face culling, Painter's algorithm, scan-line


algorithm, BSP-trees, Z-buffer/sorting, Ray tracing etc.
◻ Shading & Illumination

Phong's shading model, texture mapping, bump


mapping, Gouraudshading, Shadows and background,
Color models etc.
Various fundamental concepts and
16
principles in Computer Graphics
◻ Solid Modeling
Wire-frame, Octrees, Sweep, Boundary representations.
Regularized Boolean set operations, Constructive Solid Geometry.
◻ Curves and Surfaces

Bezier (Bernstein Polynomials) Curves, B-Splines,


Cubic-Splines, Quadratic surfaces, parametric and non-parametric
forms, Hermite Curves etc.
◻ Miscellaneous

Animation, Fractals, Projection and Viewing, Geometry,


Modeling, Image File formats, Image Morphing, Interaction (sample
and event-driven) etc.
◻ Advanced Raster Graphics Architecture

Display Processors, Pipeline and parallel architectures,


multi-processor systems, hybrid architectures.
References
17

◻ 1. Computer Graphics; Principles and practice; 2nd edn. in C;


J. Foley, A. Van Dam, Feinerand Hughes; Addison Wesley,
1997.
◻ 2. Mathematical elements for Computer Graphics; 2nd edn.; D.
F. Rogers and J. A. Adams; McGraw-Hill International. Edn.,
1990.
◻ 3.Computer Graphics -C version; D. Hearn and M. P. Baker;
Pearson Education, 2004.
◻ 4.Computer Graphics using OpenGL; 2nd edn.; F. S. Hill Jr.;
Pearson Education, 2003.
◻ 5.Procedural Elements for Computer Graphics; 2nd Edn., D. F.
Rogers, TataMcGraw-Hill, 2002.
WHAT IS COMPUTER
GRAPHICS?

Lec - 2
18
Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Objectives
◻ In this lecture, we explore what computer graphics
is about and survey some application areas
◻ We start with a historical introduction

Angel and Shreiner: Interactive Computer Graphics 6E © 19


Addison-Wesley 2012
Computer Graphics
◻ Computer graphics deals with all aspects of
creating images with a computer
Hardware
Software
Applications

Angel and Shreiner: Interactive Computer Graphics 6E © 20


Addison-Wesley 2012
Example
◻ Where did this image come from?

◻ What hardware/software did we need to produce it?

Angel and Shreiner: Interactive Computer Graphics 6E © 21


Addison-Wesley 2012
Preliminary Answer
◻ Application: The object is an artist’s rendition of
the sun for an animation to be shown in a domed
environment (planetarium)
◻ Software: Maya for modeling and rendering but
Maya is built on top of OpenGL
◻ Hardware: PC with graphics card for modeling
and rendering

Angel and Shreiner: Interactive Computer Graphics 6E © 22


Addison-Wesley 2012
Basic Graphics System

Output device
Input devices

Image formed in frame buffer

Angel and Shreiner: Interactive Computer Graphics 6E © 23


Addison-Wesley 2012
CRT

Can be used either as a line-drawing device


(calligraphic) or to display contents of frame
buffer (raster mode)
Angel and Shreiner: Interactive Computer Graphics 6E © 24
Addison-Wesley 2012
CRT

Angel and Shreiner: Interactive Computer Graphics 6E © 25


Addison-Wesley 2012
Computer Graphics: 1950-1960

◻ Computer graphics goes back to the earliest days of


computing
Strip charts
Pen plotters
Simple displays using A/D converters to go from
computer to calligraphic CRT
◻ Cost of refresh for CRT too high
Computers slow, expensive, unreliable

Angel and Shreiner: Interactive Computer Graphics 6E © 26


Addison-Wesley 2012
Computer Graphics: 1960-1970
◻ Wireframe graphics
Draw only lines
◻ Sketchpad
◻ Display Processors
◻ Storage tube

wireframe representation
of sun object

Angel and Shreiner: Interactive Computer Graphics 6E © 27


Addison-Wesley 2012
Sketchpad
◻ Ivan Sutherland’s PhD thesis at MIT
Recognized the potential of man-machine interaction
Loop
■ Display something
■ User moves light pen
■ Computer generates new display
Sutherland also created many of the now common
algorithms for computer graphics

Angel and Shreiner: Interactive Computer Graphics 6E © 28


Addison-Wesley 2012
Display Processor
◻ Rather than have the host computer try to refresh
display use a special purpose computer called a display
processor (DPU)

◻ Graphics stored in display list (display file) on display


processor
◻ Host compiles display list and sends to DPU
Angel and Shreiner: Interactive Computer Graphics 6E © 29
Addison-Wesley 2012
Direct View Storage Tube
◻ Created by Tektronix
Did not require constant refresh
Standard interface to computers
■ Allowed for standard software
■ Plot3D in Fortran
Relatively inexpensive
■ Opened door to use of computer graphics for CAD
community

Angel and Shreiner: Interactive Computer Graphics 6E © 30


Addison-Wesley 2012
Computer Graphics: 1970-1980

◻ Raster Graphics
◻ Beginning of graphics standards
IFIPS
■ GKS: European effort
■ Becomes ISO 2D standard
■ Core: North American effort
■ 3D but fails to become ISO standard
◻ Workstations and PCs

Angel and Shreiner: Interactive Computer Graphics 6E © 31


Addison-Wesley 2012
Raster Graphics
◻ Image produced as an array (the raster) of picture
elements (pixels) in the frame buffer

Angel and Shreiner: Interactive Computer Graphics 6E © 32


Addison-Wesley 2012
Raster Graphics
◻ Allows us to go from lines and wire frame images
to filled polygons

Angel and Shreiner: Interactive Computer Graphics 6E © 33


Addison-Wesley 2012
PCs and Workstations
◻ Although we no longer make the distinction
between workstations and PCs, historically they
evolved from different roots
Early workstations characterized by
■ Networked connection: client-server model
■ High-level of interactivity
Early PCs included frame buffer as part of user
memory
■ Easy to change contents and create images

Angel and Shreiner: Interactive Computer Graphics 6E © 34


Addison-Wesley 2012
Computer Graphics: 1980-1990

Realism comes to computer graphics

smooth shading environment bump mapping


mapping
Angel and Shreiner: Interactive Computer Graphics 6E © 35
Addison-Wesley 2012
Computer Graphics: 1980-1990

◻ Special purpose hardware


Silicon Graphics geometry engine
■ VLSI implementation of graphics pipeline
◻ Industry-based standards
PHIGS
RenderMan
◻ Networked graphics: X Window System
◻ Human-Computer Interface (HCI)

Angel and Shreiner: Interactive Computer Graphics 6E © 36


Addison-Wesley 2012
Computer Graphics: 1990-2000

◻ OpenGL API
◻ Completely computer-generated feature-length
movies (Toy Story) are successful
◻ New hardware capabilities
Texture mapping
Blending
Accumulation, stencil buffers

Angel and Shreiner: Interactive Computer Graphics 6E © 37


Addison-Wesley 2012
Computer Graphics: 2000-
◻ Photorealism
◻ Graphics cards for PCs dominate market
Nvidia, ATI
◻ Game boxes and game players determine direction
of market
◻ Computer graphics routine in movie industry:
Maya, Lightwave
◻ Programmable pipelines

Angel and Shreiner: Interactive Computer Graphics 6E © 38


Addison-Wesley 2012

You might also like