Вы находитесь на странице: 1из 18

1

of
19
What Is Computer Graphics?
The term computer graphics was coined in
1960 by William Fetter to describe new
design methods he was pursuing at Boeing
Fetter created a series
of widely reproduced
images on a pen plotter
exploring cockpit
design, using a 3D
model of a human body
2
of
19
What Is Computer Graphics? (cont)
Perhaps the best way to define computer graphics
is to find out what it is not. It is not a machine. It is
not a computer, nor a group of computer
programs. It is not the know-how of a graphic
designer, a programmer, a writer, a motion picture
specialist, or a reproduction specialist.
Computer graphics is all these a consciously
managed and documented technology directed
toward communicating information accurately and
descriptively.
Computer Graphics, by William A. Fetter, 1966
3
of
19
Interactive Computer Graphics
Takes things a step further by allowing users
rapid visual feedback from their actions
Typically we have the following cycle:






This area is the focus of this course
INPUT PROCESSING
DISPLAY/
OUTPUT
Mouse
Tablet and stylus
Force feedback device
Scanner
Live video streams
Screen
Paper-based printer
Video recorder
Projector
VR/AR headset
4
of
19
Interactive Computer Graphics (cont)
Sketchpad, developed in the
1960s, was the first interactive
computer graphics application
Using a light pen, key pad and
monitor it allowed users create
accurate design drawings
Dr. Ivan E. Sutherland
developed Sketchpad as
part of his PhD work. He
went on to be a hugely
i nf l uent i al comput er
scientist working in areas
as diverse as graphics,
circuit design, robotics
and computer hardware
5
of
19
So?
If we add interactivity, Fetters definition pretty
much still holds
So much of modern computing involves some
graphical aspect that computer graphics is now
ubiquitous
So lets say computer graphics encompasses
anything achieved visually on computers
6
of
19
Some Applications Of Computer
Graphics
Some of the application areas which make
heavy use of computer graphics are:
Computer aided design
Scientific visualisation
Films
Games
Virtual/Augmented Reality
NOTE: There are lots more and there is
huge overlap between these different areas

7
of
19
Introduction
Computer graphics is all about maths!
None of the maths is hard, but we need to
understand it well in order to be able to
understand certain techniques
Today well look at the following:
Coordinate reference frames
Points & lines
Vectors
Matrices
8
of
19
Coordinate Reference Frames 2D
When setting up a scene in computer
graphics we define the scene using simple
geometry
For 2D scenes we use
simple two dimensional
Cartesian coordinates
All objects are defined
using simple coordinate
pairs
x axis
y axis
P
y
x
9
of
19
Coordinate Reference Frames 2D
(cont)
x
y
(2, 3)
(2, 7) (7, 7)
(7, 3)
2 7
3
7
10
of
19
Coordinate Reference Frames 3D
For three dimensional scenes we simply add
an extra coordinate
x axis
y axis
z axis
P
y
z
x
11
of
19
Left Handed Or Right Handed?
There are two different ways in which we
can do 3D coordinates left handed or right
handed
Right-Hand
Reference System
Left-Hand
Reference System
We will mostly use
the right-handed
system
I
m
a
g
e
s

t
a
k
e
n

f
r
o
m

H
e
a
r
n

&

B
a
k
e
r
,

C
o
m
p
u
t
e
r

G
r
a
p
h
i
c
s

w
i
t
h

O
p
e
n
G
L


(
2
0
0
4
)

12
of
19
Points & Lines
Points:
A point in two dimensional space is given as
an ordered pair (x, y)
In three dimensions a point is given as an
ordered triple (x, y, z)
Lines:
A line is defined using a start point and
an end-point
In 2d: (x
start
, y
start
) to (x
end
, y
end
)
In 3d: (x
start
, y
start
, z
start
) to (x
end
, y
end
, z
end
)
13
of
19
Points & Lines (cont)
x
y
(2, 3)
(6, 7)
(7, 1)
(7, 3)
(2, 7)
The line from
(2, 7) to (7, 3)
14
of
19
The Equation of A Line
The slope-intercept
equation of a line is:

where:




The equation of the line gives us the
corresponding y point for every x point
x
y
y
0

y
end

x
end
x
0

b x m y
0
0
x x
y y
m
end
end

0 0
x m y b
15
of
19
A Simple Example
Lets draw a portion of the line given by the
equation:


Just work out the y coordinate for each x
coordinate
5
4
5
3
x y
16
of
19
A Simple Example (cont)
x
y
0
1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6
17
of
19
A Simple Example (cont)
For each x value just work out the y value:
5
3
2
5
4
3
5
3
) 3 ( y
5
1
3
5
4
4
5
3
) 4 ( y
5
4
3
5
4
5
5
3
) 5 ( y
5
2
4
5
4
6
5
3
) 6 ( y
5
5
4
7
5
3
) 7 ( y
2
5
4
2
5
3
) 2 ( y
x
y
2 3 4 5 6 7
2
5
18
of
19
Exercises 1
x
y
0
1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6
Plot the line y = x + 2 from x = 1 to x = 9

Вам также может понравиться