5 - Projective Geometry Flashcards
The coordinate system uses 5 main sets of coordinates
local,
world,
view,
clip
screen coordinates
Projective Geometry
Projections transform points in n-space to m-space, where m < n. Transforming from 3D coordinates to 2D is known as projective transformation
Perspective projection vs Parallel
Perspective :
where the distance from the centre of projection to the projection plane is infinite.
+ size varies inversely to distance - realistic
- distance and angles are not preserved
- parallel lines do not remain parallel
Parallel:
where the distance from the centre of projection to the projection plane is finite. (projection lines are parallel to each other)
+ good for exact measurements
+ parallel lines remain parallel
- distance and angles are not preserved
- less realistic
For parallel projections, a Direction of Projection (DOP) may be specified instead of a COP.
There are 3 types of parallel projection:
orthographic, axonometric, and oblique.
orthographic projection :
DOP is perpendicular to the projection plane.
Perspective Projection types
Pinhole camera model
Frustum projection
Pinhole camera model
assumes that light passes through a single point (the “pinhole”) before forming an image on the opposite side of a darkened box.
The distance between the aperture and the light-sensitive surface is called the focal length, f.
Frustum projection model
uses a pyramid-shaped frustum to project a 3D scene onto a 2D screen.
The Projection Matrix Pinhole Camera Model homogenous formula
|y1| |f/s1 0 o1 0 | |x1|
|y2| = | 0 f/s2 o2 0 | |x2|
|y3| | 0 0 1 0 | |x3|
| 1 |
Frustum Definition
A frustum is defined by a near clipping distance n, a far clipping distance f and the left l, right r, top t and bottom b clipping planes – it generates the following matrix:
Viewport Transformation
transforms from clip/canonical space (the normalised [-1, 1] × [-1, 1] space) to the viewport’s pixel coordinates, within [umin, umax] × [vmin, vmax].
Viewport Transformation steps
This involves 2D translation and scaling:
⦁ Translate canonical volume to its corner
⦁ Scale to fit the size of the 3D viewport
⦁ Translate to the lower left corner