CS488 - Introduction to Computer Graphics - Lecture 3
Comments and Questions
Geometry
The course notes give you the axioms and theorems. In class, I will
concentrate on ideas and algorithms.
Euclid and the Greeks
Of course, it's completely unfair to give the Greeks all the credit.
- Straightedge and compass.
- Congruence: two different triangles share a property called
congruence.
- Felix Klein's Erlangen program. (circa 1870).
Descartes
Points are pairs (triples, etc)
- Connects geometry to algebra.
- Computers do algebra, not geometry.
- Distance is defined: more strongly than the compass!
Points require vectors.
- Try to define addition so that algebra works.
- Consider two points P1, P2. Both are ordered pairs, triples,
etc
- There is something we can add to P1 that gives P2 as a result. P1 +
?? = P2.
Intuitively we know its value!
- To calculate the value; ?? = P2 - P1.
This is a calculation we know how to make.
- In fact ?? is something more basic than a point.
We call it a vector.
- Think again about congruence.
- Analogies of vectors
- Differences between addresses in computers. What is special about
machine code that uses only differences between addresses?
- Derivatives. What is integration?
- Mouse motion.
- Makes geometry challenging as an interpretation of algebra!
Vector Spaces, aka Linear Algebra.
We have some things that look like Descartes' points, though we don't know
exactly what they are.
We can tell when they are equal
- v1 =1 v2 if and only if x1 = x2 and
y1 = y2.
We can add them together
- v1 +1 v2 means (x1, y1) +1 (x2, y2) =1 (x1 + x2, y1 + y2)
- They are closed under addition.
- There is a zero element 01 =1 (0, 0)
Where addition is, multiplication cannot be far behind
- a *1 v =1(a * x, a * y ), called scalar
multiplication.
- They are closed under scalar multiplication.
- There is a unit element 1; there is a zero element 0.
- Scalars must be a field.
- Scalar multiplication distributes over addition: a *1 ( v1 +1 v2 ) =1 a *1
v1 +1 a *1 v2.
What are these things? We want the geometrical interpretation.
- Descartes called them points, BUT they are not like points.
How?
- You can move them around, like
- derivatives
- position independent code.
We call them vectors.
Generators
- How few vectors can I use to create all of them?
- The number is the dimension.
- A set having that number, with appropriate weasel words, is a
basis.
Affine Spaces
Intuition is that when I add an origin, O, vectors define points.
- Each point, P, can be - but is not - identified with the vector that
joins it to the origin.
- P =2 O +2 v
- This is point/vector addition.
- =2 and +2 are related to =1 as follows,
- First, P1 =2 O +2 v1 =2 P2 =2 O +2 v2 if and only if v1 =1 v2.
- Second, ( O +2 v1 ) +2 v2 =2 O +2 ( v1 +1 v2 )
- Define point subtraction
- v =1 P1 -2 P2 if and only if P1 =2 P2 +2 v
- What about point addition? P1 +? P2
=? (O +2 v1) +? (O +2
v2) =? (O +? O) +2
(v1 +1 v2)
- Pretty well impossible to make sense of, so we just disallow
it.
- Think about adding addresses
Generators
- A basis for the vectors, (v1, v2, ... ), plus one point, O.
- Package them together (v1, v2, ..., O).
Affine Combination
There is one form of point addition which makes obvious sense, called
affine combination.
- (1 - t) * P1 +3 t * P2 =2 (1 - t) * (O +2 v1) +3 t * (O +2 v2) =2 (1 - t ) * O +3 t * O +2 ((1 - t) * v1 +1 t * v2) =2 O +2
((1 - t) * v1 +1 t * v2)
- This is often called point blending and defines the line passing
through two points.
Affine Transformations
One point, Two frames
Two points, One frame
Euclidean Space
An affine space plus a metric, d(P1, P2), that has translational
invariance
- Metric is symmetric by definition
- also non-negative and obeying the triangle inequality.
- Translational invariance means: d(P1, P2) = d(P1 +2 v, P2 +2 v).
The familiar dot product (defined on vectors, Why?) is your baby.
- d(P1, P2) = ( P1 -2 P2 ) /dot ( P1
-2 P2 ) = | P1 -2 P2 |
- This gives you what Euclid was able to do with a compass, and more.
The dot product also defines ahgles between vectors.
- cos(s) = v1 \dot v2 / (|v1| |v2|),
- s is the angle between v1 and v2.
This is part of the `more' we got than compass.
Return to: