Computer Graphics (CoSc3121)
COMPUTER SCIENCE DEPARTMENT
DEBARK U N I V E R S I T Y
CHAPTER ONE-PART TWO
Computer Graphics Chapter One
2
Graphics Softwares
Graphics Display
Devices
Graphics Input
Devices
OpenGL
3
Computer Graphics Software
Two types of Grpahics softwares
Graphics Software Special purpose graphics packages
Designed for spesific purpose
Graphics Display
Used by end users
Devices
Adobe photoshop, 3D studio max, paint,
Graphics Input CAD, Microsoft Excel ...
Devices General purpose graphics packages
are pre-defined libraries for drawing
OpenGL graphics primitives
Used by programmers not by end-users
Require technical knowledge
OpenGL, Scene discription languages (to
define 3D models of scenes like VRML:
virtual reality modeling language)
4
Graphics Display Devices
Common graphics displays
CRT
Graphics Softwares
LCD
Graphics Display Plasma
Devices
Graphics Input
Devices
OpenGL
5
CRT Displays
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan Electron guns generate electron beam
Devices Electrons fired towards the screen
3D display devices Beam hits the phosphor dots
Phosphor dots emits light
Graphics Input Brightness = strength of the beam
Devices The beam passes through the magnetic field (deflection
yoke) to control their directions
3 electron beams and group of 3 phosphor dots = color
OpenGL Brightness of the RGB dots and their combination = color
of light perceived at that point
6
Random Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices Also known as vector graphics displays
3D display devices Pictures drawn = set of primitives like lines, curves
Electron beams only directed to the image parts
Graphics Input
Devices For the blank screen = no electron beem directed
Only used in hardcopy plotters
OpenGL
7
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan Primitives to be drawn converted in to a grid of
Devices dots
Raster Scan Brightness of these dots stored in a frame buffer
Devices
CRT beem sweeps across the screen line by line
3D display devices It visits every location on the screen
Graphics Input Frame buffer controls the place where the CRT
Devices electron beem switched on
Most common types of graphics displays
OpenGL
8
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan Raster: a grid of phosphor dots on the display screen
Devices
Pixel or picture cell: each phosphor dots
3D display devices
Scan-line: row of pixels in the raster
Graphics Input X-Resolution: number of pixels in the scan-line
Devices Y-Resolution: number of the scan-lines in the raster
Aspect Ratio of the display: the ratio between X-
OpenGL Resolution and Y-Resolution
9
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input Shadow mask: a mask containing many tiny holes for each
Devices pixel in the raster
it makes the slightly separated beams to hit the screen at
slightly different locations (RGB phosphors)
OpenGL
10
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan Persistance: length of time that Phosphor dots emit light
Devices after the beam has moved on (very short time)
3D display devices Permanent image = continues refresh of the raster
Electron beems sweeped across the raster scan-line by scan-
Graphics Input line
Devices Starts from top towards the bottom
When the scan line is complited, it starts again from the top
OpenGL
11
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
12
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
13
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
14
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
15
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
16
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices Refresh rate: the number of times that the entire
Raster Scan raster is refreshed in each second
Devices When the refresh rate >= 24 f/s (frames per
3D display devices second) = reasonably smooth and persistant
image,
Graphics Input Modern display devices = 60 f/s
Devices
Old grpahics displays = 30 f/s, some flicker
Interlaced scanning
OpenGL
17
Interlaced Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan alternate scan-lines are updated in each raster
Devices refresh
Raster Scan First refresh = only odd numbered scan-lines
Next refresh = only even numbered scan-lines
Devices
It effectively doubles the refresh rate
3D display devices Flicker will be avoided
Graphics Input Common Video Formats
Devices VGA: resolution 640x480, 60 f/s refresh rate, non-interlaced
scanning.
PAL: resolution 625x480, 25 f/s refresh rate, interlaced scanning
OpenGL NTSC: resolution 525x480, 30 f/s refresh rate, interlaced
scanning
18
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
19
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
20
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
21
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
22
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Random Scan
Devices
Raster Scan
Devices
3D display devices
Graphics Input
Devices
OpenGL
23
Raster Scan Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays
Frame bufferers : 2D array of data values.
Random Scan Each value corespond to a pixel in the
Devices
image
Raster Scan
Devices Bit-plain or depth of frame buffer:
number of bits used to store the value for each
3D display devices
pixel
Graphics Input 1280x1024x24 frame buffer =>
Devices resolution = 1280x1024 and depth = 24
Color devices
OpenGL Depth should be a multiple of three
For Red, Green and Blue
24
Graphics Display Devices
Common graphics displays
CRT
Graphics Softwares
LCD
Graphics Display Plasma
Devices
Graphics Input
Devices
OpenGL
Discussion
25
3D Display Devices
Graphics Softwares
Graphics Display
Devices
CRT Displays Stereoscopy: the process of providing stereo pair of
images, one to each eye of the viewer to make the viewer
Random Scan to perceive depth (stereo immersion)
Devices Head Mounted Displays (HMDs)
Raster Scan
Displays mounted on the head of the viewer
Devices
Virtual Reality Applications
3D display devices Display Moved with the viewer head
Graphics Input Head Tracked Displays (HTDs)
Devices Display remains stationary
The head of the viewer is tracked
The two eyes will receive separate stereo images
OpenGL Polarized light filters
Color filters
26
Graphics Input Devices
Graphics Softwares
Graphics Display Light pens Mouse Key board
Devices
Graphics Input
Devices
OpenGL Trackballs Joysticks
Tablet
Data Gloves
Devices which can transmit input to the graphic
system,
27
Data glove
A data glove is an interactive device,
Additional
resembling a glove worn on the hand, which
note
facilitates tactile sensing and fine-motion
control in robotics and virtual reality .
Tactile sensing involves simulation of the
sense of human touch and includes the ability
to perceive pressure, linear force, torque,
temperature, and surface texture.
Fine-motion control involves the use of
sensors to detect the movements of the user's
hand and fingers, and the translation of these
motions into signals that can be used by a
virtual hand (for example, in gaming ) or a
robotic hand (for example, in remote-control
surgery).
28
OpenGL
We will use OpenGL together with the
Graphics Softwares GL Utilities Toolkit.
Make sure that you have access to a
Graphics Display C++ development environment that
Devices
supports these two libraries.
Graphics Input Dev C++
Devices Microsoft Visual C++ also has OpenGL built-in
but not glut.
OpenGL
29
OpenGL …
OpenGL is core library that contains the
majority of the functionality.
Graphics Softwares
Four important libraries:
Graphics Display OpenGL
Devices The core library, it is platform (i.e.
hardware system) independent.
Graphics Input
Glut: GL Utilities Toolkit
Devices
Contains some extra routines for drawing
3-D objects and other
OpenGL
Glu: OpenGL Utilities
Contains some extra routines for
projections and rendering complex 3-D
objects.
Glui: Contains some extra routines for
creating user-interfaces
30
OpenGL …
Graphics Softwares
Getting Started with OpenGL
(lab…)
Graphics Display
Devices
Graphics Input
Devices
OpenGL
End of Chapter One
Any Question?
31