## Homogenous

We add a new coordinate $h$ (sometimes also $w$). To convert homogenous coordinates $(x,y,z,h)$ back into Cartesian coordinates, we divide through by $h$: $(hx ,hy ,hz )$

### As groundedness

If we interpret $h$ as groundedness, it measures how ‘translateable’ it is:

- $h=0$ for directions/vectors
- $h=1$ for positions
- $h∈{0,1}$ need to be divided by $h$ to come back into real space

### As depth

We can also interpret $h$ as camera depth.

What makes something look 3D?

- Relative size (far objects are smaller)
- Perspective (far objects converge on the origin)
- Motion parallax (far objects move slowly)

Dividing through $h$ gives us these three effects.

In order to make distant objects appear smaller and closer to the center of the screen, we use a coordinate system with $(0,0,0)$ at the center of the screen (this is done in the CCS).

This effectively projects onto the ‘near’ plane

## Barycentric Coordinates

Mostly used for interpolation. Given values known at the vertices (e.g. depth, colour, texture, surface normals), we wish to linearly interpolate their values for the interior pixels

Barycentric coordinates can be seen as a weighted combination of vertices.

- $P=αP_{1}+βP_{2}+γP_{3}$
- $α+β+γ=1$
- $0≤α,β,γ≤1$

To interpolate, $v=αv_{1}+βv_{2}+γv_{3}$

We use barycentric coordinates instead of screen space coordinates because the mid-point in screen-space may *not* be the midpoints along the real line/object.

Calculating the weighted value $α$ for the vertex $P_{1}$:

- Write an explicit line equation for the edge opposite the vertex
- Convert it into an implicit line equation ($F_{2,3}$ in this example, line connecting $P_{2}$ and $P_{3}$)
- Evaluate the implicit line equation at the vertex, let this be $k_{1}$
- $α(P)=F_{2,3}(P)/k$

## Spherical

$θ$ represents the polar angle (angle from the vertical $z$ axis) and $ϕ$ represents the azimuthal angle (angle from the $x$ axis)