# Homogeneous Coordinates

xD points gain a default x+1th value of 1 to represent the origin. xD vectors gain a default xth value of 0 (the displacement shouldn’t change - hence 0).

So essentially they’re the same except the bottom element will be 0 for vectors and 1 for points.

*We extend homogeneous coords to allow p and wp to be the same*

## Vectors & Points Addition

- Vector + Vector = Vector
- Vector + Point = Point
- Point + Point = ERROR

# Linear Combination

Linear combinations are equations that combine a set of scalars and a set of vectors by multiplying them together and adding each new result.

## General

- Scalar set s = (s1, s2, s3)
- Vector set v = (v1, v2, v3)
- Linear combination = s1v1 + s2v2 + s3v3

E.g.

Scalar set = (1, 2, 3, 4, 5)

Vector set = ((0,0), (0,1), (1,0), (1,1), (2,3))

Linear combination = 1*(0,0) + 2*(0,1) + 3*(1,0)+ 4*(1,1) + 5*(2,3))

You end up with a new vector

# Affine Combination

An affine combination is any linear combination where the scalar set sums to 1.

E.g. scalar set s = (0.1, 0.2, 0.3, 0.4)

E.g. scalar set s = (-2, 1, 3, -1)

Will get a vector somewhere on the line between the other two vectors.

# Convex Combination

Any affine combination where each element of the scalar set is between 0 and 1 (0 <= ai <= 1)

Will get a vector somewhere inside the triangle formed by the other two vectors.

# Affine Transformations; Transforming a Point/Vector

Transforming a point from one coordinate system to another just involves multiplying the point by a transformation matrix (also known as an affine transformation).

Multiplication just involves rotating the vector 90 degrees and multiplying each element of the vector with the corresponding one in the matrix row. The new value for that row will be the sum of each multiplication.

E.g.