- Request
- Sample
- Event

- Text Input
- Pointing Input

- Event Loop
- Xlib

- Callbacks
- Toolkit programming
- Java listeners

Callbacks need formal work. Java is trying hard but needs to step further back from the coal face.

The course notes give you the axioms and theorems. In class, I will concentrate on ideas and algorithms.

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.
- Similarity: two different triangles share a propety called similarity.
- Felix Klein's Erlangen program. (circa 1870).

Points are pairs (triples, etc)

- Connects geometry to algebra.
- Subtract two points
- Add (with a little hesitation) two points
- Find a additive unit, the origin, and an additive inverse
- Multiply a point by point???
- perhaps as complex numbers (in 2D at least)
- complex numbers don't generalize to 3D

Multiply a point by a scalar

- Find a multiplicative unit, the scalar 1.
- Does a multiplicative inverse exist?

Addition/subtraction might work all right, but the prominent role played by the origin is suspect. Why?

- Computers do algebra, not geometry.
- Distance is defined: more strongly than the compass!

Points morphed into vectors. What is the difference between two points?

- An arrow that goes from one point to the other
- The arrow does not change when the origin is translated
- Suppose we think only about vectors
- Subtract
- Add
- Unit, inverse
- Scalar multiply
Closed up to here

- Dot product of two vectors: defines length, angle.

- Makes geometry challenging as an interpretation of 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)
- There is an inverse: If x1 =1 x2 and y1 =1 y2, then (x1, y1 ) +1 (x2, y2 ) =1 01

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.

Transformations

Vectors can be transformed, by multiplying them by matrices

- Rigid transformations in 2D
- Unit
- Rotation
- Reflection

More complex in 3D

- Non-rigid transformations in 2D
- Scale
- Skew

If you are Felix Klein you show that they are a group, and how they separate into subgroups. But even though you are not Felix Klein your response to this formulation is the same.

- What about translation?

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

Generators

- A basis for the vectors, (v1, v2, ... ), plus one point, O.

Package them together (v1, v2, ..., O).