SlideShare a Scribd company logo
Topic 2 Graphics Systems and
Models
Dr. Collins Oduor
Kenyatta University
Chapter 1 -- Graphics Systems and Models 1
2
Chapter 1 -- Graphics Systems and
Models
2. A Graphics System
 There are 5 major elements in our system
 Processor, Memory, Frame Buffer, Input Devices, Output
Devices
3
Chapter 1 -- Graphics Systems and
Models
 2.1 Pixels and the Frame Buffer
 At present, almost all graphics systems are raster-
based
 A picture is produced from an array (the raster) of
picture elements (pixels)
 Def: depth of the frame buffer
4
Chapter 1 -- Graphics Systems and
Models
 Definitions:
 Depth of the frame buffer
 1-bit
 8-bit deep
 full-color is 24-bit or more
 Resolution
 the number of pixels in the frame buffer
 Rasterization or scan conversion
 The converting of geometric primitives into pixel
assignments in the frame buffer
5
Chapter 1 -- Graphics Systems and
Models
 2.2 Output Devices
 The dominate type of display is the Cathode-ray
tube (CRT)
 Def: refresh rate
 Graphics System
 Output Device
 The general display is cathode-ray tube (CRT)
6
Chapter 1 -- Graphics Systems and Models
7
Chapter 1 -- Graphics Systems and
Models
 Color CRT’s
 have three different colored phosphors arranged in
small groups (typically triads).
 Graphics System
 Input Devices
 The system is usually equipped with pointing devices (location
+ buttons).
 The common devices are mouse, joystick, and data tablet.
 Data gloves or computer vision system can provide higher-
dimensional data.
8
Chapter 1 -- Graphics Systems and Models
Introduction
 Graphics System
 Input Devices
9
Chapter 1 -- Graphics Systems and Models
 Graphics System
 Input Devices
10
Chapter 1 -- Graphics Systems and Models
11
Chapter 1 -- Graphics Systems and
Models
 2.3 Input Devices
 Most graphics systems provide a keyboard and at
least one other input device
 mouse
 joystick
 data tablet
 We will study these devices in Chapter 3
 Graphics System
 Processors
 In a simple system, there are only one processor for normal
processing and graphical processing.
 Today, all graphics system are characterized by special-
purpose graphical processing unit (GPU)
 It takes charge of a conversion of geometric entities to pixel
in the frame buffer (Rasterization).
12
Chapter 1 -- Graphics Systems and Models
 Graphics System
 Pixels
 An image is produced as an array (raster) of picture elements
(pixel).
13
row
column
Chapter 1 -- Graphics Systems and Models
 Graphics System
 Frame Buffer
 It is a part of memory to store the set of pixels.
 It is usually implemented with special type of memory chips
to enable redisplaying.
 Resolution: the number of pixels in frame buffer
 Depth or Precision: the number of bits used for each pixel.
14
Chapter 1 -- Graphics Systems and Models
Image Formation
 Description
 Image formation is a process analogous to how images
are formed by physical systems
 Human Visual System
 Camera
 The process combining the specification of objects with
viewers to produce 2D image.
 Object is an entity existing in space independent of any
image-formation process and any viewer.
 Viewers is a way to from images from objects.
15
Chapter 1 -- Graphics Systems and Models
Image Formation
16
Images seen by three different views
Camera View
Object
Chapter 1 -- Graphics Systems and Models
Image Formation
 Light Description
 Light is a form of electromagnetic radiation
 Wavelengths
 Frequencies
 The wavelengths in the range of 350 (nm) to 780 nm is
called visible spectrum
17
Chapter 1 -- Graphics Systems and Models
Image Formation
 Pinhole Camera Model
 A pinhole camera is a box with a small hole in the center of
one side.
 The film is placed inside the box on the side opposite the
pinhole
18
Chapter 1 -- Graphics Systems and Models
Image Formation
 Pinhole Camera Model
 Point Projection
19
( , , )
p p
x y d

/
p
x
x
z d

/
p
y
y
z d

Chapter 1 -- Graphics Systems and Models
Image Formation
 Pinhole Camera Model
 Field or View of Angle
 The angle made by the largest object that our image can
image on its film plane.
20
/ 2
tan
2
h
d


1 / 2
tan
2
h
d
 
 
1
2tan
2
h
d
 
 

Chapter 1 -- Graphics Systems and Models
Image Formation
 Pinhole Camera Model
 Depth of Field
 The longest distance that the objects can appear on its
film plane.
 The ideal pinhole camera model has an infinite depth of
field.
 Limitations
 The pinhole is so small that it admits only a single ray from
a point source
 The camera cannot be adjusted to have different angle of
view.
21
Chapter 1 -- Graphics Systems and Models
Image Formation
 Human Visual System
22
視網膜上兩種視覺接受器:
• 錐細胞錐細胞 (cone): 6~7 million
• 桿細胞桿細胞 (rod):75~150
million
Chapter 1 -- Graphics Systems and Models
Image Formation
 Human Visual System
23
人類的視覺神經路徑人類的視覺神經路徑
網膜→視交叉→側膝核→視皮質網膜→ 視交叉→
側膝核→視皮質
Chapter 1 -- Graphics Systems and Models
24
Chapter 1 -- Graphics Systems and
Models
3. Images:
Physical and Synthetic
 The Usual pedagogical approach:
 construct raster images
 simple 2D entities (points, lines, polygons)
 Define objects based upon 2D
 Because such functionality is supported by most present
computer graphics systems, we are going to learn to
create images here, rather than expand a limited model.
25
Chapter 1 -- Graphics Systems and
Models
 3.1 Objects and Viewers
 Two basic entities must be part of any image-
formation process:
 the object
 the viewer
 The object exists in space independent of any image-
formation process, and of any viewer.
26
Chapter 1 -- Graphics Systems and
Models
 3.2 Light and Images
 Much information was missing from the preceding
picture:
 We have yet to mention light!
 If there were no light sources the objects would be dark,
and there would be nothing visible in our image.
 We have not mentioned how color enters the picture
 Or, what are the effects of different kinds of surfaces
on the objects.
27
Chapter 1 -- Graphics Systems and
Models
 Taking a more physical approach, we can start with
the following arrangement:
 The details of the interaction between light and the
surfaces of the object determine how much light
enters the camera.
28
Chapter 1 -- Graphics Systems and
Models
 Light is a form of electromagnetic radiation:
29
Chapter 1 -- Graphics Systems and
Models
 3.3 Ray Tracing
 We can start building an imaging model by following
light from a source.
30
Chapter 1 -- Graphics Systems and
Models
 Ray tracing is an image formation technique that is
based on these ideas and that can form the basis for
producing computer generated images.
31
Chapter 1 -- Graphics Systems and
Models
4. The Human Visual System
 Our extremely complex visual system has all the components
of a physical imaging system, such as a camera or a
microscope.
32
Chapter 1 -- Graphics Systems and
Models
5. The Pinhole Camera
 What is one?
 A Pinhole camera is a box
 with a small hole in the center on one side,
 and the film on the opposite side
33
Chapter 1 -- Graphics Systems and
Models
 Pinhole camera near Cliff House in San Francisco
34
Chapter 1 -- Graphics Systems and
Models
6. The Synthetic Camera Model
 Consider the imaging system shown here:
35
Chapter 1 -- Graphics Systems and
Models
 A few Basic principles:
 First, the specification of the objects is independent of
the specification of the viewer.
 In a graphics library we would expect separate functions
for specifying objects and the viewer.
 Second, we can compute the image using simple
trigonometric calculations
36
Chapter 1 -- Graphics Systems and
Models
 Because of this, we can move the image plane in front
of the lens (call this the projection plane) and end up
with:
 In Chapter 5, we discuss this process in detail and
derive the relevant mathematical formulas
37
Chapter 1 -- Graphics Systems and
Models
 We must also consider the limited size of the image.
 Therefore, we must discuss clipping:
38
Chapter 1 -- Graphics Systems and
Models
7. The Programmer’s Interface
 There are numerous ways that a user can interact with a
graphics system.
 In a typical paint program it would look like:
39
Chapter 1 -- Graphics Systems and
Models
 7.1 Application Programmer’s Interfaces
 What is an API?
 Why do you want one?
40
Chapter 1 -- Graphics Systems and
Models
 If we are to follow the synthetic camera model, we
need functions in the API to specify:
 Objects
 Viewer
 Light Sources
 Material Properties
41
Chapter 1 -- Graphics Systems and
Models
 We can define a viewer or camera in a variety of
ways
 We can identify four types of necessary specifications:
 Position
 Orientation
 Focal length
 Film plane
42
Chapter 1 -- Graphics Systems and
Models
 Light sources can be defined by their location,
strength, color, and directionality.
 API’s provide a set of functions to specify these
parameters for each source.
 Material properties are characteristics, or attributes,
of the objects
 such properties are usually defined through a series of
function calls at the time that each object is defined.
43
Chapter 1 -- Graphics Systems and
Models
 7.2 A Sequence of Images
 In Chapter 2 , we begin our detailed discussion of
the OpenGL API
 Color Plates 1 through 8 show what is possible with
available hardware and a good API, but also they are
not difficult to generate
44
Chapter 1 -- Graphics Systems and
Models
8. Graphics Architectures
 On one side of the API is the application program. On the
other is some combination of hardware and software that
implements the functionality of the API
 Researchers have taken various approaches to developing
architectures to support graphics APIs
45
Chapter 1 -- Graphics Systems and
Models
 Early systems used general purpose computers
 single processing unit
 In the early days of computer graphics, computers
were so slow that refreshing even simple images,
containing a few hundred line segments, would
burden an expensive computer
46
Chapter 1 -- Graphics Systems and
Models
 8.1 Display Processors
 The earliest attempts to build a special purpose
graphics system were concerned primarily with
relieving the task of refreshing the display
47
Chapter 1 -- Graphics Systems and
Models
 8.2 Pipeline Architectures
 The major advances in graphics architectures parallel
closely the advances in workstations.
 For computer graphics applications, the most
important use of custom VLSI circuits has been in
creating pipeline architectures
 A simple arithmetic pipeline is shown here:
48
Chapter 1 -- Graphics Systems and
Models
 If we think in terms of processing the geometry of our
objects to obtain an image, we can use the following
block diagram:
 We will discuss the details of these steps in
subsequent chapters.
49
Chapter 1 -- Graphics Systems and
Models
 8.3 Transformations
 Many of the steps in the imaging process can be
viewed as transformations between representations
of objects in different coordinate systems
 for example: from the system in which the object was
defined to the system of the camera
 We can represent each change of coordinate
systems by a matrix
 We can represent successive changes by multiplying
(or concatenating) the individual matrices into a single
matrix.
50
Chapter 1 -- Graphics Systems and
Models
 8.4 Clipping
 Why do we Clip?
 Efficient clipping algorithms are developed in
Chapter 7
51
Chapter 1 -- Graphics Systems and
Models
 8.5. Projection
 In general three-dimensional objects are kept in
three dimensions as long as possible, as they pass
through the pipeline.
 Eventually though, they must be projected into two-
dimensional objects.
 There are various projections that we can
implement.
 We shall see in Chapter 5 that we can implement
this step using 4 x 4 matrices, and, thus, also fit it
into the pipeline.
52
Chapter 1 -- Graphics Systems and
Models
 8.6 Rasterization
 Finally, our projected objects must be represented
as pixels in the frame buffer.
 We discuss this scan-conversion or rasterization
process in Chapter 7
53
Chapter 1 -- Graphics Systems and
Models
 8.7 Performance Characteristics
 There are two fundamentally different types of
processing
 Front end -- geometric processing, based on the
processing of vertices
 ideally suited for pipelining, and usually involves floating-
point calculations.
 The geometry engine developed by SGI was a VLSI
implementation for many of these operations in a special
purpose chip. These became the basis for a series of
graphics workstations.
 Back end -- involves direct manipulation of bits in the
frame buffer.
 Ideally suited for parallel bit processors.
Programmer Interface
 Description
 There are numerous ways that a user can interact with a
graphics system.
 A user develops images through interactions with display
using input devices.
 Someone develops the code for the application
54
Chapter 1 -- Graphics Systems and Models
Programmer Interface
 API Functions
 It is to provide interfaces between an application program
and a graphics system.
 API in OpenGL
 It is to specify how to form an image: (1) Objects, (2) Viewer,
(3) Light Source(s), (4) Materials
 The APIs provided by OpenGL is based on the synthetic-
camera model.
55
Chapter 1 -- Graphics Systems and Models
Programmer Interface
 Objects
 Objects are usually defined by sets of vertices
 Most APIs provide sets of primitive objects (primitives) for
the user.
 Points (0D object)
 Line segments (1D objects)
 Polygons (2D objects)
 Some curves and surfaces
 OpenGL programs define primitives through lists of
vertices.
56
Chapter 1 -- Graphics Systems and Models
Programmer Interface
 Example
57
glBegin(GL_POLYGON)
glVertex3f(0.0, 0.0, 0.0);
glVertex3f(0.0, 1.0, 0.0);
glVertex3f(0.0, 0.0, 1.0);
glEnd( );
type of object
location of vertex
end of object definition
Chapter 1 -- Graphics Systems and Models
Programmer Interface
 Example
 glBegin() and glEnd()brackets the calls to define the
object to be drawn.
 OpenGL Commands
 Prefix: gl
 Initial capital letters for each word
 Optional Character: number of arguments or type
 OpenGL Constants
 Prefix: GL
 All characters are capitilized
 Underscores among Words.
58
glVertex3f(0.0, 0.0, 0.0);
glBegin(GL_POLYGON)
Chapter 1 -- Graphics Systems and Models
Programmer Interface
 Viewer
 Available APIs differ in how much flexibility in camera
selection.
 Camera Specifications
 Position
 Orientation
 Focal Length
 Film Plane.
59
Chapter 1 -- Graphics Systems and Models
Programmer Interface
 Light
 Point sources v.s distributed sources
 Spot lights
 Near and far sources
 Color properties
 Material Properties
 Absorption: color properties
 Scattering
60
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 General Description
 Two Sides of API
 Application Program
 Combination of hardware and software that implements the
functionality of the API.
 Various approaches are to develop graphics architectures
for supporting graphics APIs.
61
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Early Graphics System
 It used general-purposed computers characterized by a
CPU.
 CPU Task
 Run the application program
 Compute the endpoints of line segment.
62
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Display Processors
 The display processors include instructions to display
primitives.
 The display primitives are stored in its own memory
denoted as display list.
63
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Pipeline Architecture
 The creation of special-purpose VLSI chips enables the
pipeline technology.
 The pipeline is workable in graphics because it processes
data in the same manner.
 For two stage pipeline, the throughput of the system has
been doubled.
64
a+(b*c)
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Scene Geometry
 Scene geometry is the collection of primitives and vertices.
 A scene consists of a set of objects.
 Each object comprises a set of primitives.
 A primitive comprises a set of vertices.
 In a complex scene, there are may be thousands of
vertices.
 We must process all these vertices in a similar manner to
form an image in the frame buffer.
65
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Graphics Pipeline
 The imaging processing includes four steps.
 Vertex Processing
 Clipping and Primitive Assembly
 Rasterization
 Fragment Processing
 These four steps can be performed in a pipeline manner.
66
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Vertex Processing
 Coordinate Transformation: imaging process is a
transformation between different coordinate system.
 Vertex Coloring
 Program Specification
 Computation from a realistic shading model.
67
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Clipping and Primitive Assembly
 Determine the area in the world that can be seen by the
camera.
 Clipping Volume
 The projection in this volume appear in the image.
 Those that are outside are to be clipped out.
 The clipping is done in primitive level rather than vertex
level.
 The output of this stage is a set of primitives whose
projections can appear in the image.
68
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Clipping and Primitive Assembly
69
3D Clipping Volume
2D Clipping Volume
Chapter 1 -- Graphics Systems and Models
Graphics Architecture
 Rasterization (Drawing)
 It converts the primitives in terms of vertices to pixels in
the frame buffer.
 The output is a set of fragments for each primitive, that
is, pixel with color or location
 Fragment Processing
 It takes the generated fragments to update the pixels in
the frame buffer.
 The pixels in frame buffer can be read to blend with the
fragment.
70
Chapter 1 -- Graphics Systems and Models

More Related Content

PDF
Robot Machine Vision
DOCX
10cs65-cgnotes
PPTX
Ch1.pptx
PDF
Sub ecs 702_30sep14
PPTX
Digital Image Processing fundamentals.pptx
PPTX
CG.pptx
PPT
ROBOTIC-VISION-include image processing techniques
PPT
ROBOTIC-VISION system in the field of robotics
Robot Machine Vision
10cs65-cgnotes
Ch1.pptx
Sub ecs 702_30sep14
Digital Image Processing fundamentals.pptx
CG.pptx
ROBOTIC-VISION-include image processing techniques
ROBOTIC-VISION system in the field of robotics

Similar to Topic 2 Graphics Systems and Models.ppt (20)

PPT
ROBOTIC-VISION describe the functionality of robot arm
DOCX
Autonomous robot
PDF
Fundamentals of Computer Graphics.pdf
PPTX
CG Unit No.1.pptx computer graphics and gaming
DOCX
newcgreppainnewcgreppainnewcgreppainnewcgreppainnewcgreppain
PDF
Implementation of Picwords to Warping Pictures and Keywords through Calligram
PDF
object ttacking real time embdded ystem using imag processing
DOCX
MAJOR PROJECT
PPTX
12202040701105_Introduction to Computer Graphics.pptx
PPTX
ch-1.1 image processing fundamentals.pptx
PDF
Gi3511181122
PDF
Digital image processing using matlab
DOCX
Laureate Online Education Internet and Multimedia Technolog.docx
PDF
Unit 1 DIP Fundamentals - Presentation Notes.pdf
PPTX
final ppt
PPT
Introduction to Machine Vision
PPTX
OpenCV+Android.pptx
PPT
image Processing Fundamental Is .ppt
PPT
Image Processing Fundamentals .ppt
PDF
Computer Graphics Interview Questions.pdf
ROBOTIC-VISION describe the functionality of robot arm
Autonomous robot
Fundamentals of Computer Graphics.pdf
CG Unit No.1.pptx computer graphics and gaming
newcgreppainnewcgreppainnewcgreppainnewcgreppainnewcgreppain
Implementation of Picwords to Warping Pictures and Keywords through Calligram
object ttacking real time embdded ystem using imag processing
MAJOR PROJECT
12202040701105_Introduction to Computer Graphics.pptx
ch-1.1 image processing fundamentals.pptx
Gi3511181122
Digital image processing using matlab
Laureate Online Education Internet and Multimedia Technolog.docx
Unit 1 DIP Fundamentals - Presentation Notes.pdf
final ppt
Introduction to Machine Vision
OpenCV+Android.pptx
image Processing Fundamental Is .ppt
Image Processing Fundamentals .ppt
Computer Graphics Interview Questions.pdf
Ad

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Approach and Philosophy of On baking technology
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
project resource management chapter-09.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
A Presentation on Touch Screen Technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
1. Introduction to Computer Programming.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Chapter 5: Probability Theory and Statistics
Approach and Philosophy of On baking technology
Web App vs Mobile App What Should You Build First.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Digital-Transformation-Roadmap-for-Companies.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
project resource management chapter-09.pdf
Heart disease approach using modified random forest and particle swarm optimi...
A Presentation on Touch Screen Technology
MIND Revenue Release Quarter 2 2025 Press Release
Getting Started with Data Integration: FME Form 101
Programs and apps: productivity, graphics, security and other tools
1 - Historical Antecedents, Social Consideration.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
A Presentation on Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
1. Introduction to Computer Programming.pptx
A novel scalable deep ensemble learning framework for big data classification...
Ad

Topic 2 Graphics Systems and Models.ppt

  • 1. Topic 2 Graphics Systems and Models Dr. Collins Oduor Kenyatta University Chapter 1 -- Graphics Systems and Models 1
  • 2. 2 Chapter 1 -- Graphics Systems and Models 2. A Graphics System  There are 5 major elements in our system  Processor, Memory, Frame Buffer, Input Devices, Output Devices
  • 3. 3 Chapter 1 -- Graphics Systems and Models  2.1 Pixels and the Frame Buffer  At present, almost all graphics systems are raster- based  A picture is produced from an array (the raster) of picture elements (pixels)  Def: depth of the frame buffer
  • 4. 4 Chapter 1 -- Graphics Systems and Models  Definitions:  Depth of the frame buffer  1-bit  8-bit deep  full-color is 24-bit or more  Resolution  the number of pixels in the frame buffer  Rasterization or scan conversion  The converting of geometric primitives into pixel assignments in the frame buffer
  • 5. 5 Chapter 1 -- Graphics Systems and Models  2.2 Output Devices  The dominate type of display is the Cathode-ray tube (CRT)  Def: refresh rate
  • 6.  Graphics System  Output Device  The general display is cathode-ray tube (CRT) 6 Chapter 1 -- Graphics Systems and Models
  • 7. 7 Chapter 1 -- Graphics Systems and Models  Color CRT’s  have three different colored phosphors arranged in small groups (typically triads).
  • 8.  Graphics System  Input Devices  The system is usually equipped with pointing devices (location + buttons).  The common devices are mouse, joystick, and data tablet.  Data gloves or computer vision system can provide higher- dimensional data. 8 Chapter 1 -- Graphics Systems and Models
  • 9. Introduction  Graphics System  Input Devices 9 Chapter 1 -- Graphics Systems and Models
  • 10.  Graphics System  Input Devices 10 Chapter 1 -- Graphics Systems and Models
  • 11. 11 Chapter 1 -- Graphics Systems and Models  2.3 Input Devices  Most graphics systems provide a keyboard and at least one other input device  mouse  joystick  data tablet  We will study these devices in Chapter 3
  • 12.  Graphics System  Processors  In a simple system, there are only one processor for normal processing and graphical processing.  Today, all graphics system are characterized by special- purpose graphical processing unit (GPU)  It takes charge of a conversion of geometric entities to pixel in the frame buffer (Rasterization). 12 Chapter 1 -- Graphics Systems and Models
  • 13.  Graphics System  Pixels  An image is produced as an array (raster) of picture elements (pixel). 13 row column Chapter 1 -- Graphics Systems and Models
  • 14.  Graphics System  Frame Buffer  It is a part of memory to store the set of pixels.  It is usually implemented with special type of memory chips to enable redisplaying.  Resolution: the number of pixels in frame buffer  Depth or Precision: the number of bits used for each pixel. 14 Chapter 1 -- Graphics Systems and Models
  • 15. Image Formation  Description  Image formation is a process analogous to how images are formed by physical systems  Human Visual System  Camera  The process combining the specification of objects with viewers to produce 2D image.  Object is an entity existing in space independent of any image-formation process and any viewer.  Viewers is a way to from images from objects. 15 Chapter 1 -- Graphics Systems and Models
  • 16. Image Formation 16 Images seen by three different views Camera View Object Chapter 1 -- Graphics Systems and Models
  • 17. Image Formation  Light Description  Light is a form of electromagnetic radiation  Wavelengths  Frequencies  The wavelengths in the range of 350 (nm) to 780 nm is called visible spectrum 17 Chapter 1 -- Graphics Systems and Models
  • 18. Image Formation  Pinhole Camera Model  A pinhole camera is a box with a small hole in the center of one side.  The film is placed inside the box on the side opposite the pinhole 18 Chapter 1 -- Graphics Systems and Models
  • 19. Image Formation  Pinhole Camera Model  Point Projection 19 ( , , ) p p x y d  / p x x z d  / p y y z d  Chapter 1 -- Graphics Systems and Models
  • 20. Image Formation  Pinhole Camera Model  Field or View of Angle  The angle made by the largest object that our image can image on its film plane. 20 / 2 tan 2 h d   1 / 2 tan 2 h d     1 2tan 2 h d      Chapter 1 -- Graphics Systems and Models
  • 21. Image Formation  Pinhole Camera Model  Depth of Field  The longest distance that the objects can appear on its film plane.  The ideal pinhole camera model has an infinite depth of field.  Limitations  The pinhole is so small that it admits only a single ray from a point source  The camera cannot be adjusted to have different angle of view. 21 Chapter 1 -- Graphics Systems and Models
  • 22. Image Formation  Human Visual System 22 視網膜上兩種視覺接受器: • 錐細胞錐細胞 (cone): 6~7 million • 桿細胞桿細胞 (rod):75~150 million Chapter 1 -- Graphics Systems and Models
  • 23. Image Formation  Human Visual System 23 人類的視覺神經路徑人類的視覺神經路徑 網膜→視交叉→側膝核→視皮質網膜→ 視交叉→ 側膝核→視皮質 Chapter 1 -- Graphics Systems and Models
  • 24. 24 Chapter 1 -- Graphics Systems and Models 3. Images: Physical and Synthetic  The Usual pedagogical approach:  construct raster images  simple 2D entities (points, lines, polygons)  Define objects based upon 2D  Because such functionality is supported by most present computer graphics systems, we are going to learn to create images here, rather than expand a limited model.
  • 25. 25 Chapter 1 -- Graphics Systems and Models  3.1 Objects and Viewers  Two basic entities must be part of any image- formation process:  the object  the viewer  The object exists in space independent of any image- formation process, and of any viewer.
  • 26. 26 Chapter 1 -- Graphics Systems and Models  3.2 Light and Images  Much information was missing from the preceding picture:  We have yet to mention light!  If there were no light sources the objects would be dark, and there would be nothing visible in our image.  We have not mentioned how color enters the picture  Or, what are the effects of different kinds of surfaces on the objects.
  • 27. 27 Chapter 1 -- Graphics Systems and Models  Taking a more physical approach, we can start with the following arrangement:  The details of the interaction between light and the surfaces of the object determine how much light enters the camera.
  • 28. 28 Chapter 1 -- Graphics Systems and Models  Light is a form of electromagnetic radiation:
  • 29. 29 Chapter 1 -- Graphics Systems and Models  3.3 Ray Tracing  We can start building an imaging model by following light from a source.
  • 30. 30 Chapter 1 -- Graphics Systems and Models  Ray tracing is an image formation technique that is based on these ideas and that can form the basis for producing computer generated images.
  • 31. 31 Chapter 1 -- Graphics Systems and Models 4. The Human Visual System  Our extremely complex visual system has all the components of a physical imaging system, such as a camera or a microscope.
  • 32. 32 Chapter 1 -- Graphics Systems and Models 5. The Pinhole Camera  What is one?  A Pinhole camera is a box  with a small hole in the center on one side,  and the film on the opposite side
  • 33. 33 Chapter 1 -- Graphics Systems and Models  Pinhole camera near Cliff House in San Francisco
  • 34. 34 Chapter 1 -- Graphics Systems and Models 6. The Synthetic Camera Model  Consider the imaging system shown here:
  • 35. 35 Chapter 1 -- Graphics Systems and Models  A few Basic principles:  First, the specification of the objects is independent of the specification of the viewer.  In a graphics library we would expect separate functions for specifying objects and the viewer.  Second, we can compute the image using simple trigonometric calculations
  • 36. 36 Chapter 1 -- Graphics Systems and Models  Because of this, we can move the image plane in front of the lens (call this the projection plane) and end up with:  In Chapter 5, we discuss this process in detail and derive the relevant mathematical formulas
  • 37. 37 Chapter 1 -- Graphics Systems and Models  We must also consider the limited size of the image.  Therefore, we must discuss clipping:
  • 38. 38 Chapter 1 -- Graphics Systems and Models 7. The Programmer’s Interface  There are numerous ways that a user can interact with a graphics system.  In a typical paint program it would look like:
  • 39. 39 Chapter 1 -- Graphics Systems and Models  7.1 Application Programmer’s Interfaces  What is an API?  Why do you want one?
  • 40. 40 Chapter 1 -- Graphics Systems and Models  If we are to follow the synthetic camera model, we need functions in the API to specify:  Objects  Viewer  Light Sources  Material Properties
  • 41. 41 Chapter 1 -- Graphics Systems and Models  We can define a viewer or camera in a variety of ways  We can identify four types of necessary specifications:  Position  Orientation  Focal length  Film plane
  • 42. 42 Chapter 1 -- Graphics Systems and Models  Light sources can be defined by their location, strength, color, and directionality.  API’s provide a set of functions to specify these parameters for each source.  Material properties are characteristics, or attributes, of the objects  such properties are usually defined through a series of function calls at the time that each object is defined.
  • 43. 43 Chapter 1 -- Graphics Systems and Models  7.2 A Sequence of Images  In Chapter 2 , we begin our detailed discussion of the OpenGL API  Color Plates 1 through 8 show what is possible with available hardware and a good API, but also they are not difficult to generate
  • 44. 44 Chapter 1 -- Graphics Systems and Models 8. Graphics Architectures  On one side of the API is the application program. On the other is some combination of hardware and software that implements the functionality of the API  Researchers have taken various approaches to developing architectures to support graphics APIs
  • 45. 45 Chapter 1 -- Graphics Systems and Models  Early systems used general purpose computers  single processing unit  In the early days of computer graphics, computers were so slow that refreshing even simple images, containing a few hundred line segments, would burden an expensive computer
  • 46. 46 Chapter 1 -- Graphics Systems and Models  8.1 Display Processors  The earliest attempts to build a special purpose graphics system were concerned primarily with relieving the task of refreshing the display
  • 47. 47 Chapter 1 -- Graphics Systems and Models  8.2 Pipeline Architectures  The major advances in graphics architectures parallel closely the advances in workstations.  For computer graphics applications, the most important use of custom VLSI circuits has been in creating pipeline architectures  A simple arithmetic pipeline is shown here:
  • 48. 48 Chapter 1 -- Graphics Systems and Models  If we think in terms of processing the geometry of our objects to obtain an image, we can use the following block diagram:  We will discuss the details of these steps in subsequent chapters.
  • 49. 49 Chapter 1 -- Graphics Systems and Models  8.3 Transformations  Many of the steps in the imaging process can be viewed as transformations between representations of objects in different coordinate systems  for example: from the system in which the object was defined to the system of the camera  We can represent each change of coordinate systems by a matrix  We can represent successive changes by multiplying (or concatenating) the individual matrices into a single matrix.
  • 50. 50 Chapter 1 -- Graphics Systems and Models  8.4 Clipping  Why do we Clip?  Efficient clipping algorithms are developed in Chapter 7
  • 51. 51 Chapter 1 -- Graphics Systems and Models  8.5. Projection  In general three-dimensional objects are kept in three dimensions as long as possible, as they pass through the pipeline.  Eventually though, they must be projected into two- dimensional objects.  There are various projections that we can implement.  We shall see in Chapter 5 that we can implement this step using 4 x 4 matrices, and, thus, also fit it into the pipeline.
  • 52. 52 Chapter 1 -- Graphics Systems and Models  8.6 Rasterization  Finally, our projected objects must be represented as pixels in the frame buffer.  We discuss this scan-conversion or rasterization process in Chapter 7
  • 53. 53 Chapter 1 -- Graphics Systems and Models  8.7 Performance Characteristics  There are two fundamentally different types of processing  Front end -- geometric processing, based on the processing of vertices  ideally suited for pipelining, and usually involves floating- point calculations.  The geometry engine developed by SGI was a VLSI implementation for many of these operations in a special purpose chip. These became the basis for a series of graphics workstations.  Back end -- involves direct manipulation of bits in the frame buffer.  Ideally suited for parallel bit processors.
  • 54. Programmer Interface  Description  There are numerous ways that a user can interact with a graphics system.  A user develops images through interactions with display using input devices.  Someone develops the code for the application 54 Chapter 1 -- Graphics Systems and Models
  • 55. Programmer Interface  API Functions  It is to provide interfaces between an application program and a graphics system.  API in OpenGL  It is to specify how to form an image: (1) Objects, (2) Viewer, (3) Light Source(s), (4) Materials  The APIs provided by OpenGL is based on the synthetic- camera model. 55 Chapter 1 -- Graphics Systems and Models
  • 56. Programmer Interface  Objects  Objects are usually defined by sets of vertices  Most APIs provide sets of primitive objects (primitives) for the user.  Points (0D object)  Line segments (1D objects)  Polygons (2D objects)  Some curves and surfaces  OpenGL programs define primitives through lists of vertices. 56 Chapter 1 -- Graphics Systems and Models
  • 57. Programmer Interface  Example 57 glBegin(GL_POLYGON) glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd( ); type of object location of vertex end of object definition Chapter 1 -- Graphics Systems and Models
  • 58. Programmer Interface  Example  glBegin() and glEnd()brackets the calls to define the object to be drawn.  OpenGL Commands  Prefix: gl  Initial capital letters for each word  Optional Character: number of arguments or type  OpenGL Constants  Prefix: GL  All characters are capitilized  Underscores among Words. 58 glVertex3f(0.0, 0.0, 0.0); glBegin(GL_POLYGON) Chapter 1 -- Graphics Systems and Models
  • 59. Programmer Interface  Viewer  Available APIs differ in how much flexibility in camera selection.  Camera Specifications  Position  Orientation  Focal Length  Film Plane. 59 Chapter 1 -- Graphics Systems and Models
  • 60. Programmer Interface  Light  Point sources v.s distributed sources  Spot lights  Near and far sources  Color properties  Material Properties  Absorption: color properties  Scattering 60 Chapter 1 -- Graphics Systems and Models
  • 61. Graphics Architecture  General Description  Two Sides of API  Application Program  Combination of hardware and software that implements the functionality of the API.  Various approaches are to develop graphics architectures for supporting graphics APIs. 61 Chapter 1 -- Graphics Systems and Models
  • 62. Graphics Architecture  Early Graphics System  It used general-purposed computers characterized by a CPU.  CPU Task  Run the application program  Compute the endpoints of line segment. 62 Chapter 1 -- Graphics Systems and Models
  • 63. Graphics Architecture  Display Processors  The display processors include instructions to display primitives.  The display primitives are stored in its own memory denoted as display list. 63 Chapter 1 -- Graphics Systems and Models
  • 64. Graphics Architecture  Pipeline Architecture  The creation of special-purpose VLSI chips enables the pipeline technology.  The pipeline is workable in graphics because it processes data in the same manner.  For two stage pipeline, the throughput of the system has been doubled. 64 a+(b*c) Chapter 1 -- Graphics Systems and Models
  • 65. Graphics Architecture  Scene Geometry  Scene geometry is the collection of primitives and vertices.  A scene consists of a set of objects.  Each object comprises a set of primitives.  A primitive comprises a set of vertices.  In a complex scene, there are may be thousands of vertices.  We must process all these vertices in a similar manner to form an image in the frame buffer. 65 Chapter 1 -- Graphics Systems and Models
  • 66. Graphics Architecture  Graphics Pipeline  The imaging processing includes four steps.  Vertex Processing  Clipping and Primitive Assembly  Rasterization  Fragment Processing  These four steps can be performed in a pipeline manner. 66 Chapter 1 -- Graphics Systems and Models
  • 67. Graphics Architecture  Vertex Processing  Coordinate Transformation: imaging process is a transformation between different coordinate system.  Vertex Coloring  Program Specification  Computation from a realistic shading model. 67 Chapter 1 -- Graphics Systems and Models
  • 68. Graphics Architecture  Clipping and Primitive Assembly  Determine the area in the world that can be seen by the camera.  Clipping Volume  The projection in this volume appear in the image.  Those that are outside are to be clipped out.  The clipping is done in primitive level rather than vertex level.  The output of this stage is a set of primitives whose projections can appear in the image. 68 Chapter 1 -- Graphics Systems and Models
  • 69. Graphics Architecture  Clipping and Primitive Assembly 69 3D Clipping Volume 2D Clipping Volume Chapter 1 -- Graphics Systems and Models
  • 70. Graphics Architecture  Rasterization (Drawing)  It converts the primitives in terms of vertices to pixels in the frame buffer.  The output is a set of fragments for each primitive, that is, pixel with color or location  Fragment Processing  It takes the generated fragments to update the pixels in the frame buffer.  The pixels in frame buffer can be read to blend with the fragment. 70 Chapter 1 -- Graphics Systems and Models