Title: CS450: Computer Graphics
1CS450 Computer Graphics
Geometric Objects and Transformations
2Scalars, Points, and Vectors
A scalar is a magnitude only. Ex -3.5
A vector is a magnitude and a direction. Vectors
are represented pictorially as a DIRECTED LINE
SEGMENT. The length of the vector represents its
magnitude.
3Scalars, Points, and Vectors
Two vectors are ADDED using the HEAD-TO-TAIL
rule, and addition is commutative.
A vector is NOT ANCHORED in space. A POINT is
anchored in space as the HEAD of a vector
extending outward from the ORIGIN of the space.
4Lines
if P and Q are points in an affine space, the set
of points of the form R(t) (1- t) P t
Q form a line passing through P and Q.
5Lines
6Convexity
An object is CONVEX if any point on a line
segment between any two points in the object is
also in the object.
The CONVEX HULL of an object is the smallest
convex object which contains the original.
7Dot and Cross Products
8Dot and Cross Products
9Dot and Cross Products
The angle between two vectors u and v can also be
computed using the magnitude of the cross
product sin 0 u
v
u x v
10Planes
if P, Q and R are three points in an affine
space, and they are not coliniear, then the plane
defined by P, R and Q is F(s,t) (1-s)((1- t)
P t Q) s R
11Planes
The plane equation can also be given as follows
(a,b,c) (x-x0,y-y0,z-z0)
0 where n (a,b,c) plane normal T
(x,y,z) T represents any test point P
(x0,y0,z0) a known point in the plane
.
12Planes
ax by cz d 0 ,where d -(ax0
by0 cz0) If we evaluate the left side for a
given point T (x,y,z) in 3D space and the
result is lt
0, T lies beneath the plane
0, T lies on the plane
gt 0, T lies above the
plane
13Planes
A vector, n, which is orthogonal to both u and v
can be computed as
n u x v This vector is called the
surface normal.