graphics core Flashcards

(54 cards)

1
Q

What is a point in homogeneous coordinates?

A

[x,y,z,1]^T

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

What is a vector in homogeneous coordinates?

A

[x,y,z,0]^T

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

Order of applying transformations in matrix form.

A

Right‑to‑left:
Final = T · R · S · p

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

How to rotate around an arbitrary point P?

A

Translate to origin → Rotate → Translate back
M=T(P) R T(-P)

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

What does the view matrix do?

A

Transforms world → camera space using camera basis (u, v, w) and camera position.

Steps:
- w=
(target - eye)
———————-
||target - eye||
- s= f x up
- u= s x f
- Build matrix:
ux uy uz -s.eye
vx vy vz -u.eye
-wx -wy -wx f.eye
0 0 0 1

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

How to compute camera basis vectors?

A
  • w= normalize(eye-target)
  • u= normalize(up×w)
  • v= w×u
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Clip → NDC → Screen mapping

A

Clip → NDC:
x_ndc = x_c/w_c

NDC → Pixel X:
pixel_x =
x_ndc+1
———— . W
2

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

DDA step size

A

Steps = max(dx, dy)
(dx and dy are change in x and y)

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

DDA increments

A

x_inc = dx/steps
y_inc = dy/steps
- Loop: x+=x_inc, y+=y_inc → round to pixel

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

Scanline fill rule

A

Count intersections with edges → odd = inside, even = outside.
For each scanline:
- Find intersections with edges
- Sort x‑values
- Fill between pairs: (x1,x2), (x3,x4)…

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

Edge cases in scanline fill

A
  • Ignore horizontal edges
  • Count top vertices, not bottom
  • Avoid double‑counting shared vertices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Painter’s algorithm

A
  • Sort all polygons by depth (distance from camera).
  • Draw the furthest ones first.
  • Draw the nearest ones last.
  • Whatever is drawn last overwrites earlier colours.
    Fails with cycles and interpenetration.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Z‑buffer algorithm

A

Per‑pixel depth test.
Keeps nearest fragment.
No sorting needed.

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

Painter’s vs Z‑buffer

A
  • Painter’s: draw back → front, overwrites
  • Z‑buffer: per‑pixel depth test, keeps nearest
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Supersampling anti‑aliasing (SSAA)

A

Render at higher resolution → downsample.
Works with Z‑buffer

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

MSAA

A

MSAA reduces jagged edges by taking multiple depth/coverage samples per pixel but only one colour sample. It smooths triangle edges efficiently without the full cost of supersampling.

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

FXAA / post‑process AA

A

Edge detection + blur.
Fast, works after rasterisation.

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

Reflection mapping

A

Uses environment map.
Cheap, approximate, no self‑reflections.

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

Shadow mapping pipeline

A
  • Render scene from light → depth map
  • Render scene from camera
  • For each fragment:
    – Transform fragment into light space
    – Compare depth to shadow map
    – If > stored depth → in shadow
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Two‑pass rendering

A

Render scene from mirror → use as texture.
Accurate for planar mirrors only.

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

Ray tracing reflections

A

Recursive rays → accurate multi‑bounce reflections.

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

Polygon mesh representation

A
  • A polygon mesh approximates a surface using many triangles. It is fast and flexible but only approximate and may require many polygons for smooth results.
    – Faceted unless high resolution
23
Q

Implicit quadric representation

A
  • Exact smooth surface
  • Fast intersection
    – Limited shapes
  • An implicit quadric is a surface defined by a second‑degree polynomial in x,y,z. It gives exact smooth shapes and very fast ray intersections but can only represent simple forms like spheres, cylinders, and cones.
24
Q

Continuity

A
  • C0: positions match
  • C1: tangents match
  • C2: curvature matches (B‑splines)
25
B‑splines
- Do NOT interpolate control points - Guarantee C2 continuity - Smoothest option
26
Bézier patches
A Bézier patch is a smooth bicubic surface defined by 16 control points. It uses Bézier basis functions in both u and v directions. It is smooth and easy to model but does not interpolate all control points and requires many patches for complex shapes.
27
Rendering equation meaning
Outgoing light = emitted + reflected incoming light
28
Visibility term v(p,p')
1 if unobstructed, 0 if in shadow.
29
Emission term E(p,p')
Light emitted from p' toward p.
30
BRDF term p(p,p',p'')
How surface reflects light from direction p'' to p.
31
Ray casting
Ray casting - Only primary rays - No reflections - No global illumination
32
Ray tracing
- Recursive reflections/refractions - Perfect mirrors, glass - Shadow rays
33
Path tracing
- Random sampling of diffuse bounces - Approximates full rendering equation
34
Radiosity
- Only diffuse surfaces - Solves energy exchange between patches
35
How ray casting simplifies the rendering equation
No recursion, no indirect light → only first visible surface
36
How path tracing simplifies rendering
Monte‑Carlo sampling of random light paths → approximates full integral.
37
How radiosity simplifies rendering
Assumes diffuse surfaces → solves linear system of energy exchange
38
Bézier curve endpoints
Curve passes through P_1 and P_4
39
Tangents of cubic Bézier
first: p'(0): 3(P_2-P_1) p'(1): 3(P_4-P_3) second: p"(0): 6(P0 - 2P1 + P2) p"(1): 6(P3 - 2P2 + P1) (P0->P3 are control points)
40
C1 continuity between two Bézier segments
Shared point + aligned tangents
41
C2 continuity
Shared point + equal first and second derivatives → control points collinear and evenly spaced
42
Speed along curve
speed =|| p'(u) ||
43
What is flat shading?
One normal per face → one colour per triangle
44
What is Gouraud shading? When does it fail?
Vertex colours computed using lighting → colours interpolated across triangle. Fails: Specular highlights can be missed if they fall between vertices.
45
What is Phong shading? When does it fail?
Interpolate normals across triangle → compute lighting per pixel → smooth highlights. Fails: More expensive; still approximate if normals are poorly defined
46
Ambient term
Constant light everywhere. I_a=k_aL_a
47
Diffuse term (Lambertian)
The brightness depends only on how directly the light hits the surface, not on the viewing direction. I_d=k_dL_d max (0,n.l)
48
Specular term (Phong)
Shiny highlight based on reflection vector. I_s=k_sL_s(r. v)^n
49
Blinn–Phong specular term
Uses halfway vector h. I_s=k_sL_s(n.h)^n More stable and cheaper than Phong.
50
How do shadow maps work?
Render scene from light → store depth → compare fragment depth to shadow map
51
What shading components are affected by shadows?
- Ambient: unchanged - Diffuse: zero if in shadow - Specular: zero if in shadow
52
General Cubic Polynomial
p(u)=au^3+bu^2+cu+d
53
General Cubic Derivatives
p'(u)=3au^2+2bu+c p''(u)=6au+2b
54
Drag Force
F_d=-kv