A camera only takes a picture of part of the scene
A Common Approach:
Use the concept of a pinhole camera (rather than, say, a
single lens reflex camera) but put the "film"
(called the view plane or screen) in front
of the pinhole
The Axis-Aligned Case
Visualization:
Notation:
\(\bs{u}\), \(\bs{v}\), and \(\bs{w}\)
denote the coordinate axes (i.e., the basis) for the view
\(\bs{e}\) denotes the eye/pinhole position (in
scene/world coordinates) which is the origin in view
coordinates
\(\bs{c}\) denotes the lower-left corner of the
view plane
Notes:
Nothing between the eye and the view plane is visible
The "chopped pyramid" shape that contains everything that
can be seen is a frustum (the walls of which are
the clipping planes)
The General Case
Desirable Functionality:
The ability to position the eye/camera anywhere
and have it point in any direction
Visualization (when Centered):
Notation:
\(\bs{g}\) denotes the gaze direction (which is normal
to the view plane)
\(\bs{h}\) denotes the head-up direction
The General Case (cont.)
What's Needed:
A basis for the view plane (with \(\bs{e}\) at
the origin)
Determining \(\bs{w}\):
The opposite direction of \(\bs{g}\), and with unit length.
So, \(\bs{w} = -\frac{\bs{g}}{||\bs{g}||}\).
Determining \(\bs{u}\):
Orthogonal to both \(\bs{h}\) and \(\bs{w}\),
and with unit length.
So, \(\bs{u} = -\frac{\bs{h} \times \bs{w}}
{||\bs{h} \times \bs{w}||}\).
Determining \(\bs{v}\):
Orthogonal to \(\bs{w}\) and \(\bs{u}\), and
with unit length.
So, \(\bs{v} = \bs{w} \times \bs{u}\) (which has
unit length).
The General Case (cont.)
Another Consideration:
The shape of the pixels
For Square Pixels:
Must ensure that \(\frac{2u}{2v} = \frac{u}{v}\)
equals the aspect ratio (i.e., the width divided by the height)
Specifying Parameters
An Observation:
There are many different ways to specify the
parameters of this model
A Common Approach:
Use the focal length (i.e., the distance between the
eye/camera and the view plane), the vertical field of view
(which is an angular measure), and the aspect ratio
Specifying Parameters (cont.)
A Visualization:
Interpretation:
We are looking at the view plane "edge on" (so \(\bs{u}\)
is pointing out of the illustration)
Notation:
\(\phi\) denotes the (vertical) field of view
\(s\) denotes the focal length
Use:
The "half height" can be calculated from \(\phi\)
and \(s\)
The "half width" can be calculated from the "half
height" and the aspect ratio