0% found this document useful (0 votes)
33 views58 pages

CG Chapter 1 and 2

The document provides an introduction to computer graphics, covering its definition, history, types, and applications. It explains the processes involved in generating images, such as imaging, modeling, rendering, and animation, and discusses the evolution of computer graphics from the 1950s to present. Additionally, it highlights various application areas including data visualization, CAD, virtual reality, and entertainment.

Uploaded by

desalegndagne717
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views58 pages

CG Chapter 1 and 2

The document provides an introduction to computer graphics, covering its definition, history, types, and applications. It explains the processes involved in generating images, such as imaging, modeling, rendering, and animation, and discusses the evolution of computer graphics from the 1950s to present. Additionally, it highlights various application areas including data visualization, CAD, virtual reality, and entertainment.

Uploaded by

desalegndagne717
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Chapter-One

Introduction to Computer Graphics

1 Computer Graphics (Tadesse B.) CS@SLU


Outlines
Introduction
History of Computer Graphics
Types of computer graphics
Application Area

2 Computer Graphics 12/24/2023


Introduction


Computer graphics is an art of drawing pictures, lines, charts, etc., using computer
with the help of program or software.
Generally , computer graphics is concerned with all aspects of producing pictures or
images, and it involves
 Computer graphics provides methods to generate images using a computer for use in
any medium. It includes composition of one or more of the following:
1) Imaging: - It is the process of representing 2D images.
2) Modelling:-It is the process of creating and representing 3D objects. Mainly deals
with the shape of the object.
3) Rendering: - It is the process of constructing 2D images from 3D models. It focuses
on lighting and perspective of objects.
4) Animation: - It is the process of describing the change in objects in time. It
represent movement of the object.
Computer graphics 12/24/2023
Cont.…

Computer graphics has made computers easier to interact with, and interpret data.
Technically, the term computer graphics refers to:
 The representation and manipulation of image data by a computer.
 The technologies used to create and manipulate image.
 The sub-field of computer science which studies methods for digitally synthesizing
and manipulating visual content.

Computer graphics 12/24/2023


History of computer graphics
 Computer graphics was introduced in the early 1950s

 The phrase "computer graphics" was coined in 1960 by William Fetter.

 Expensive hardware and the limited availability of software kept the field from
growing until the early 1980s,

 Bit-map technology has emerged, together with high-resolution display screens.

Computer graphics 12/24/2023


Cont.
 The major inventions in the history of computer graphics are the following:

 In 1950s, pen plotters were used for drawing a picture.

 In 1960s sketchpad was invented to draw a picture.

 In 1970s display hardware were invented for color raster display.

 In 1980s, dynamic raster displays and flight simulators were developed.

 During the 1990s, OpenGL graphics processing library was developed.

 In 2001, was the first fully computer-generated feature film were produced.

Computer graphics 12/24/2023


Types of computer graphics
Computer Graphics can be broadly divided into two :
1. Non Interactive Computer Graphics: :- passive computer graphics, the observer has
no control over the image.
2. Interactive Computer Graphics: involves a two way communication between
computer and user.

Conceptual Framework for


Interactive Graphics

Computer graphics 12/24/2023


Applications of Computer Graphics
 Data Visualisation

 Graphs and charts

 Computer-Aided Design (CAD)

 Scientific visualization

 Simulation and animation

 Virtual Reality and Augmented Reality

 Education and Training

 Graphical User Interfaces

 Entertainment

Computer graphics 12/24/2023


Graphs and charts
 Graphs and charts have long been used for visualising data.

 They are particularly widely used for visualising relationships and trends in scientific,
mathematical, financial and economic data.

 Modern visualisation packages use 3-D effects such as shadowing to make the
graph/chart more visually appealing. Fig:1 shows Computer Graphics used for
drawing graphs and charts.

Computer graphics 12/24/2023


Cont.

Fig. 1. Graphs and charts

Computer graphics 12/24/2023


Computer-Aided Design

 Used in design of buildings, automobiles, aircraft, watercraft, spacecraft, computers,


textiles & many other products

 AutoCAD software was the first CAD program.

 Graphics design package provides standard shapes.

 Animations are also used in CAD applications.

 Realistic displays of architectural design.

Computer graphics 12/24/2023


Cont.

Fig:2 Computer Graphics used for Computer-Aided Design (CAD)

Computer graphics 12/24/2023


Data Visualisation
 Visualization is the process of representing data graphically and interacting with these
representations in order to gain insight into the data.

 Scientific Visualization: Producing graphical representations for scientific,


engineering, and medical data sets.

 Scientists, engineers, medical personnel, business analysis, and others often need to
analyse large amounts of information or to study the behaviour of certain processes.

Computer graphics 12/24/2023


Medical Visualization

Computer graphics 12/24/2023


Scientific Visualization

Visualization of protein structure

Computer graphics 12/24/2023


Virtual Reality and Augmented Reality
 Augmented Reality: An artificial environment created through the combination of
real-world and computer generated data.

 Augmented Reality was initially designed for medicine, military and maintenance
purposes.

 Cellphone companies such as Nokia, Qualcomm, Google are willing to fund research
on AR.

Computer graphics 12/24/2023


Virtual Reality and Augmented Reality
 Virtual Reality (VR)
 A computer generated, interactive, 3D environment in which a person is
immersed : virtual, interactive and immersive

 Augmented Reality (AR)


 Supplements the real world with the virtual(computer generated) objects that
appear to coexist in the same space as the real world.

Computer graphics 12/24/2023


Cont.…
Engineering Education–Virtual Storm

Surgery

Computer graphics 12/24/2023


Education and Training
 Computer generated models of physical, financial and economic systems are used as
educational aids.
 Models of physical systems, physiological systems, population trends, or equipment
such as color-coded diagram help trainees understand the operation of the system.
 Specialized systems used for training applications: Simulators for practice sessions or
training of ship captains.
 Aircraft pilots
 Heavy equipment operators
 Air traffic-control personnel

Computer graphics 12/24/2023


Graphical User Interfaces
 Another possibility that has been opened up by the improvements in computer
graphics technology is in the area of user interfaces.
 Modern user interfaces have made multitasking (doing several things at once) much
easier and applications such as word-processors have become much more powerful.
 Text-Based and Graphical User Interfaces

Command line interface Graphical user interface


Computer graphics 12/24/2023
Entertainment
 The applications of computer graphics in entertainment fall into three categories:
computer art, special effects and animations, and games.
 Movie Industry
1. Used in motion pictures, music, videos, and television shows.
2. Used in making of cartoon animation films.

Computer graphics 12/24/2023


Cont.…

 Computer-generated images (CGI) have been widely used in the entertainment industry
for producing special effects for films, and also for producing completely computer-
generated films.

Computer generated image (CGI)

Computer graphics 12/24/2023


Cont.…
 Game Industry
 Focus on interactivity
 Cost effective solutions
 Avoiding computations and other tricks

Computer graphics 12/24/2023


24 Computer Graphics(Tadesse B.) CS@SLU
Chapter-Two
Graphics Hardware

1 Computer Graphics 12/24/2023


Outlines

A graphics system

Raster Display Systems

Introduction to The 3D Graphics Pipeline

Hidden Surface Removal

2 Computer Graphics 12/24/2023


A graphics system


In computer graphics, software refers to a program or collection
of programs that enable a person to manipulate images or models
visually on a computer.


CG programs: is the graphical programming languages to draw
geometrical shapes like circle, ellipse, rectangle, draw curves,
objects with various colors, 3d graphics programming, simple
animation programs, and algorithms programs.: C,C++,java,JS

3 Computer Graphics 12/24/2023


Cont. …
A
 Graphics system has the following elements: Hardware and software
Input Devices
Output Devices
Processor
Memory
Pixel and Frame Buffer

4 Computer Graphics 12/24/2023


Hardware
Input and output device
Graphics hardware is computer hardware that generates computer

graphics and allows them to be shown on a display, usually using a
graphics card (video card) in combination with a device driver to
create the images on the screen.
These are quite important for any software because an

inappropriate selection of the concerned hardware may produce
some erroneous results or may process data of some other format.

5 Computer Graphics 12/24/2023


Cont. …

Output : video display devices Input device

Monitors

 Keyboard

Cathode ray tubes (CRT)
 Mouse

Raster scan display
 Joystick

color CRT monitors

Plasma panel display  Light Pen


Liquid crystal monitor  Digitizer
 Voice Recognition
 Image Scanner

6 Computer Graphics 12/24/2023


Processor

It is a part of hardware or interpreter which is used to convert
digital information from CPU to analog data.

The frame buffer is a part of RAM in a computer allocated to
hold the graphics information for one frame or picture.

CPU/GPU is a processor used to generate and load images into
frame buffer and frame buffer is read out by video controller to
display on the screen

7 Computer Graphics 12/24/2023


Graphics in a computers memory


A computer screen is made up of
little dots, called PICture 00000000
ELements. (pixels).
01100110

If you make each dot on or off, 00000000
you can build up a monochrome 00011000
(black and white) picture. 00000000

Also, off and on can be 01000010
represented by binary 0 and 1. 00111100
00000000

8 Computer Graphics 12/24/2023


Graphics in a computers memory


Here is a diagram that shows a small
00000000
picture graphic represented by a 01100110
binary number. 00000000

Black and white allow ONE bit per 00011000
pixel. 00000000

Colour allows 8, 16 or even 24 bits 01000010
per pixel. 00111100
00000000

9 Computer Graphics 12/24/2023


Pixels and the Frame Buffer
Most
 graphics systems are raster-based.
The raster is an array of picture elements pixels.

The pixels are stored in the frame buffer.

The depth of the frame buffer=num.

Bits used per pixel.


 1-bit-deep⇒blackandwhiteonly.
 8-bit-deep⇒28=256 colors.

 24-bit-deep⇒theRGB-colour system: red, green, blue, 256 shades for each.

10 Computer Graphics 12/24/2023


Software in Computer Graphics

In computer graphics, graphics software refers to a program or
collection of programs that enable a person to manipulate
images or models visually on a computer.

Common graphics editors include

Adobe, Photoshop, Illustrator, Maya 3D, Paint Shop Pro,
blender, CorelDRAW, Adobe Lightroom, Digital Image Suite,
Canva.

11 Computer Graphics 12/24/2023


Video Output Devices
Immersive

Head-mounted
 displays (HMD)
Stereo shutter glasses

Virtual Retinal Display (VRD)

CAVE™


12 Computer Graphics 12/24/2023


Video Output Devices

Desktop

Vector
 display
CRT

LCD
 flat panel
Plasma

workstation displays(Sun Lab)

PC and Mac laptops

Tablet computers

Wacom’s display tablet

Digital Micro mirror Devices (projectors)

Field Emission Devices (FEDs)

Organic Light-Emitting Diode (OLED) Arrays


13 Computer Graphics 12/24/2023


Cont. …
There
 are two ways of displaying pixels:
non-interlaced
 row by row, i.e. scan line by scan line, typically 50 to 80Hz
(times per second).
interlaced
odd and even rows are refreshed alternately, used in television.
For example, at 60 Hz, the screen is red raw only 30 times per
second.

14 Computer Graphics 12/24/2023


The Cathode Ray Tube (CRT/Monitor)

A cathode ray tube is based on the simple concept that an electronic
beam, when hits a phosphorescent surface, produces a beam of light

The beam of light itself can be focused to any point on the screen by
using suitable electronic / magnetic fields.

The direction and intensity of the fields will allow one to determine
the extent of the defection of the beam.

These electronic / magnetic fields can be easily manipulated by using
suitable electric fields with this background.

15 Computer Graphics 12/24/2023


CRT

16 Computer Graphics 12/24/2023


Liquid-crystal Displays
Liquid-crystal
 displays (LCD) commonly used in small
systems
Liquid
 crystal, compounds have a crystalline arrangement
of molecules, flow like a liquid

To
 control light twisting, voltage applied to intersecting conductors to
align the molecules

Using thin-film transistor technology, place a transistor at
each pixel location

17 12/24/2023 Computer Graphics


Raster scan systems


The Raster Scan is a scanning technique in graphics monitor where
the electron beam is moved along the screen covering one line at a
time from top to bottom.

Rasterization or scan conversion is the assignment of values to pixels
in the frame buffer that best represent graphical primitives: lines,
circles, polygons, etc.

Done by the processor.

In a raster scan, the electron beam is swept across the screen, ne 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

18 Computer Graphics 12/24/2023


Raster scan systems


Picture definition is stored in memory area called refresh buffer or
frame buffer

This memory area holds the set of intensity values for all screen
points

Stored intensity value are then retrieved from the refresh buffer and
painted on the screen one row (scan line) at a time.

Each screen points is referred as pixels as a pixel (picture elements)
at the end of each lien, the electron beam returns to the left side of
the screen to begin displaying the next scan line

19 Computer Graphics 12/24/2023


Pros and Cons
Advantages to Raster Displays
lower
 cost
filled regions/shaded images

Disadvantages to Raster Displays
A
 discrete representation, continuous primitives must be scan-
converted (i.e. fill in the appropriate scan lines)
Aliasing or "jaggies" Arises due to sampling error when

converting from a continuous to a discrete representation

20 Computer Graphics 12/24/2023


3D Rendering Pipeline
It
 is the stages required to transform a three-dimensional image into a two-
dimensional screen.

Rendering
 pipeline or Graphics pipeline, is a framework within computer
graphics that outlines the necessary procedures for transforming a three-
dimensional (3D) scene into a two-dimensional (2D) representation on a
screen.

There
 are 4 common stages:
 Vertex processing
 Clipping
 Rasterization
 fragment processing

21 Computer Graphics 12/24/2023


3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation

Lighting
This is a pipelined
sequence of operations
Viewing to draw a 3D primitive
Transformation
into a 2D image

Projection (this pipeline applies only for direct


Transformation
illumination)

Clipping

Scan
Conversion

Image Computer 12/24/2023

Graphi2c2s
Example: OpenGL

Modeling
Transformation
glBegin(GL_POLYGON);
glVertex3f(0.0, 0.0, 0.0);
Viewing
Transformation glVertex3f(1.0, 0.0, 0.0);
glVertex3f(1.0, 1.0, 1.0);
Lighting & glVertex3f(0.0, 1.0, 1.0);
Texturing
glEnd();
Projection
Transformation
OpenGL executes steps
Clipping of 3D rendering pipeline
for each polygon
Scan
Conversion

Image Computer 12/24/2023

Graphi2c3s
3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation Transform into 3D world coordinate system

Viewing
Transformation

Lighting &
Texturing

Projection
Transformation

Clipping

Scan
Conversion

Image Computer 12/24/2023

Graphi2c4s
3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation Transform into 3D world coordinate system

Viewing Transform into 3D camera coordinate system


Transformation Done with modeling transformation
Lighting &
Texturing

Projection
Transformation

Clipping

Scan
Conversion

Image Computer 12/24/2023

Graphi2c5s
3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation Transform into 3D world coordinate system

Viewing Transform into 3D camera coordinate system


Transformation Done with modeling transformation
Lighting & Illuminate according to lighting and reflectance
Texturing
Apply texture maps
Projection
Transformation

Clipping

Scan
Conversion

Image Computer 12/24/2023

Graphi2c6s
3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation Transform into 3D world coordinate system

Viewing Transform into 3D camera coordinate system


Transformation Done with modeling transformation
Lighting & Illuminate according to lighting and reflectance
Texturing
Apply texture maps
Projection
Transformation Transform into 2D screen coordinate system

Clipping

Scan
Conversion

Image Computer 12/24/2023

Graphi2c7s
3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation Transform into 3D world coordinate system

Viewing Transform into 3D camera coordinate system


Transformation Done with modeling transformation
Lighting & Illuminate according to lighting and reflectance
Texturing
Apply texture maps
Projection
Transformation Transform into 2D screen coordinate system

Clipping Clip primitives outside camera’s view

Scan
Conversion

Image Computer 12/24/2023

Graphi2c8s
3D Rendering Pipeline
3D Geometric Primitives

Modeling
Transformation Transform into 3D world coordinate system

Viewing Transform into 3D camera coordinate system


Transformation Done with modeling transformation
Lighting & Illuminate according to lighting and reflectance
Texturing
Apply texture maps
Projection
Transformation Transform into 2D screen coordinate system

Clipping Clip primitives outside camera’s view

Scan
Conversion Draw pixels (includes texturing, hidden surface, ...)

Image Computer 12/24/2023

Graphi2c9s
Hidden Surface Removal

One of the most challenging problems in computer graphics is the
removal of hidden parts from images of solid objects.

In real life, the opaque material of these objects obstructs the light
rays from hidden parts and prevents us from seeing them.

In the computer generation, no such automatic elimination takes
place when objects are projected onto the screen coordinate system.

Instead, all parts of every object, including many parts that should
be invisible are displayed.

To remove these parts to create a more realistic image, we must
apply a hidden line or hidden surface algorithm to set of objects.

The algorithm operates on different kinds of scene models, generate
various forms of output or cater to images of different complexities.

30 Computer Graphics 12/24/2023


Hidden Surface Removal
All
 use some form of geometric sorting to distinguish visible parts
of objects from those that are hidden.
Just as alphabetical sorting is used to differentiate words near the

beginning of the alphabet from those near the ends.
Geometric sorting locates objects that lie near the observer and

are therefore visible.
Hidden line and Hidden surface algorithms capitalize on various

forms of coherence to reduce the computing required to generate
an image.
Different types of coherence are related to different forms of

order or regularity in the image.
Scan line coherence arises because the display of a scan line in a

raster image is usually very similar to the display of the preceding
scan line.

31 Computer Graphics 12/24/2023


Types of hidden surface detection
algorithms

Object space methods:


• After comparison visible, invisible or hardly visible surface is
determined.
• These methods generally decide visible surface. So these
algorithms are line based instead of surface based.
Image space methods:
• Here positions of various pixels are determined.
• It is used to locate the visible surface instead of a visible line.
• So the object close to the viewer that is pierced by a projector
through a pixel is determined.
• That pixel is drawn is appropriate color.
• These methods are also called a Visible Surface Determination.

32 Computer Graphics 12/24/2023


Cont. …

The
 implementation of these methods on a computer requires a
lot of processing time and processing power of the computer.
The image space method requires more computations. Each object

is defined clearly.Visibility of each object surface is also determined.
Algorithms used for hidden line surface detection

Z-Buffer Algorithm
Scan Line Algorithm

33 Computer Graphics 12/24/2023


Cont… Chapter-Two

34 Computer Graphics
12/24/2023

You might also like