Coordinates and Positions Flashcards

1
Q

Orthographic

A

Orthographic projection is a form of parallel projection, where every projection line runs orthogonal to the projection plane.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name two vector interpretations of the numeric vector representation (2,3).

A

A position vector and a direction vector. The numeric representation is the same, but the two interpretations are different objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the difference between position vectors and direction vectors in their 4-number representations in terms of xyzw.

A

Position vectors have W=1, direction vectors have W=0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

GLKMatrix4MakePerspective

A
Parameters:
Field of View (Y) in Radians
Aspect (height/width)
Near Z
Far Z
Creates a perspective projection matrix (perspective, not orthographic)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Given XYZW, how do you get normalized coordinates?

A

Divide by W.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the projection matrix mathematically.

A

It is a 4x4 matrix that performs a linear transformation in homogeneous space. It doesn’t actually perform the transformation, but it sets vector positions up for the next step.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the advantages of homogeneous coordinates?

A

They allow points at infinity to be represented with finite coordinates (w=0), and they allow all projective transformations (including affine transformations, such as translation) to be performed using matrix multiplications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the effect of multiplying a homogeneous coordinate by a scalar?

A

The coordinate is not changed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Give a 4x4 translation matrix.

A

1 0 0 0
0 1 0 0
0 0 1 0
tx ty tz 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Give a 4x4 rotation matrix in terms of the original orthonormal basis x, y, z, and x’, y’, z’.

A
xx' yx' zx' 0
xy' yy' zy' 0
xz' yz' zz'  0
  0   0   0   1
(dot products)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the dot product of two normal vectors?

A

Since the normal vectors have magnitude of one, the dot product is simply the cosine of the angle between them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe skew or shear in terms of x,y, and z.

A

Skew adds an offset to one coordinate based on the magnitude of another coordinate. For example, an image could be shifted right at the top, shifted left at the bottom, and not shifted at all in the middle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give a 4x4 shear matrix skewing x and y in z.

A

1 0 0 0
0 1 0 0
kx ky 1 0
0 0 0 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give a 4x4 scale matrix.

A

a 0 0 0
0 a 0 0
0 0 a 0
0 0 0 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Give a 4x4 projection matrix.

A
1  0  0  0
0  1  0  0
0  0  0  -1/E
0  0  0  1
where
E = EyeZ, or the distance from the eye to the screen, or near clipping plane. This matrix transforms a vector into :
x  y  0  1-z/EyeZ
So it scales them by that ratio. For example, with an EyeZ of 1 and a z of -10, the transformation of (x,y,z) would be (x/11, y/11, 1). So it brings far-away things into the center of the screen.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What direction is x, y and z?

A

X goes right, Y goes up. The cross product leaves us with Z coming out of the screen.

17
Q

Why are homogeneous coordinates called “homogeneous”?

A

Because (x,y,z,w) = a(x,y,z,w).

18
Q

Why are triangles used in rendering engines?

A

Because they are always planar. Triangle strips and fans are also very efficient to render.

19
Q

What are the stages of the rasterization pipeline?

A

Transformations: Model Space -> Clip Space -> NDC -> Scan Conversion -> Fragment Processing
NDC = Normalized Device Coordinates

20
Q

How are triangles clipped?

A

Triangles are clipped at the clipping plane by turning them into one or more new triangles depending on how many points are inside of the viewing area.

21
Q

Where does the eye look?

A

The eye looks in the negative z direction.

22
Q

What is perspective division?

A

Converting 4D homogeneous coordinates to 3D coordinates by dividing x,y,z by w. This is the final step to convert clip coordinates to NDC.

23
Q

What is a frustum?

A

A pyramid with the tip chopped off.

24
Q

What are the dimensions of the viewing volume in clip coordinates?

A

x=[-1,1], y=[-1,1], z=[-1,1], w=[-inf,inf]. Vertices outside of the xyz ranges can be discarded, and their triangles reconfigured.

25
Q

Describe the viewport transformation.

A

Takes NDC, scales xy to screen height/width in pixels, scales z to [0,1] and calls it depth. xyz becomes xyd.

26
Q

Describe the ModelView matrix in terms of Model and View.

A

Model refers to a transformation from object coordinates to world coordinates. This can account for the fact that objects are facing different directions, for instance. These are entirely application constructs, OpenGL does not support them directly.

View transforms from world coordinates to camera coordinates.

The two matrices are usually combined.

27
Q

What is the range and direction of Z as a depth buffer?

A

Z = [0,1], with 0 being near and 1 being far (opposite direction of Z coordinate!).

28
Q

What is scan conversion?

A

Changing a triangle into fragments using the pixel sample (center-of-pixel coordinate) and texture information.

29
Q

What is the invariance guarantee?

A

OpenGL guarantees that two polygons with shared edge vertex positions will have no gaps, and also guarantees that the same vertex data passed through the same vertex processor will have identical output.