### Question 1

We've now described aliasing in the context of sampling triangle coverage and sampling texture functions. Describe and compare the primary technique used to reduce aliasing when sampling coverage with the technique used to reduce aliasing when sampling from textures. Why do you think we choose different anti-aliasing solutions in each of these contexts?

**Solution:** When sampling coverage, we used supersampling (dense sampling) to capture high freqency content in the coverage signal (e.g., triangle edges). This reduces aliasing but incurs the high cost of computing many samples per pixel. In texture mapping we have the ability to preprocess the texture remove high-frequency content (we do this in building a mip-map). Then at runtime, when sampling from a texture it is possible to avoid aliasing by selecting the right level of the mip-map (in other words, the appropriate amount of pre-blurring) to use to avoid aliasing. How much filtering is required is computed here.

### Question 2

Imagine you are rendering an image of the Ogre model shown on slide 33 to a 1920x1080 (HD) display. You zoom the camera in very close so that the object fills the screen. Imagine that the texture map used for the Ogre is a 128x128 texture. Describe how the image might look.

**Solution:** It will look very blurry since this is a situation of severe texture magnification. Each pixel in the texture map is blown up to a much bigger region in the rendered image.

### Question 3

Consider the edge equation `E(x,y) = Ax + By + C`

. Show that `E(x,y)`

computes the distance to the edge (up to a scale).

**Solution:** A good illustration of the answer is given in the geometry queries lecture.
Given an edge equation `E(x,y) = Ax + By + C`

the normal to the edge is given by the vector N=[A,B]^T. So evaluating an edge equation `E(p)`

on a point `p=(x,y)`

is evaluating `N dot p + C`

. Geometrically, the closest point on a line to a point P is found by moving from P towards the line in the direction normal to the line, so the distance to the line is given by `d`

where `P-dN`

is on the line. It can be shown that `d = -(N dot p + C)`

.

### Question 4 (optional math review)

Consider the vectors `v1`

and `V2`

in 2D. Give an equation for the area of a triangle described by these two vectors. Now consider 3D versions of the vectors and give an equation for the area of the 3D triangle formed from the two vectors.