Explain linear algebra for graphics transforms
MVP Pipeline, Homogeneous Coordinates, NDC, Screen Space, and Normal Transformation
Context
You are working in a standard real-time graphics pipeline. Use column vectors, right-handed camera space, and OpenGL-style conventions unless noted:
-
Clip-space to NDC uses perspective divide by w.
-
NDC ranges: x, y, z ∈ [−1, 1].
-
Viewport origin at the bottom-left.
Tasks
-
Explain the model–view–projection (MVP) pipeline using homogeneous coordinates.
-
Derive how a 3D point in world space transforms to normalized device coordinates (NDC), and then to screen (window) space.
-
Explain why surface normals are transformed by the inverse-transpose of the model (or model-view) matrix.
-
Provide a concrete numeric example that goes from world space to screen space and demonstrates correct normal transformation.
Constraints & Assumptions
-
Preserve the scope, facts, inputs, and requested outputs from the prompt above.
-
If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
-
Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.
Clarifying Questions to Ask
-
Clarify the random variables, distributional assumptions, independence assumptions, and desired output.
-
Show enough derivation for the interviewer to follow the reasoning.
-
Explain how you would validate the result with simulation or sensitivity checks.
What a Strong Answer Covers
-
A correct setup with definitions, formulas, and boundary conditions.
-
A step-by-step derivation or estimation plan.
-
Interpretation of the result, including uncertainty and practical limitations.
-
Checks for assumptions, edge cases, and numerical stability.
Follow-up Questions
-
How would the result change if the assumptions were relaxed?
-
Can you verify the answer with a simulation?
-
What is the most likely source of estimation error?