Introduction to View Transformation
Viewing Transformation
is the mapping of coordinates of points and lines that form the picture into
appropriate coordinates on the display device.
World coordinate system (WCS) is the right handed cartesian co-ordinate system
where we define the picture to be displayed.
A finite region in
the WCS is called the Window.
The corresponding coordinate system on the display device where the image
of the picture is displayed is called the
physical coordinate system. Mapping the window onto a subregion of
the display device called the viewport is called the Viewing
Transformation.
Normalized device coordinate (NDC) is the display area of the virtual
display device corresponding to a unit square. The lower left handed corner
is the origin of the coordinate system. Mapping the window
in the world coordinate space to viewport in NDC space is called the
Normalization Transformation, N.
where is the scale in x and y directions, given by
A 3D scene can be viewed from any posistion in 3D space.
A "synthetic" camera positioned and oriented in 3D space
can be used to describe the viewing, and the part
of the image or scene to be viewed . It has the following
three principal ingredients.
- View plane: The window is defined in this plane.
- The origin of this plane which defines the position of
the eye or camera is called the view reference point
.
- A unit vector
to this plane
is the view plane normal .
- Another vector called the viewup vector
is a unit vector perpendicular to
.
- View coordinate system: Usually a left handed
system called the UVN system is used.
- An eye defined within this system.
and e determines a plane orthogonal to
containing e.
Let be the look-at-point.
For perspective views, the view plane normal as a unit vector from eye to a ``look-at point'' is given by
The view up vector is the tilt (rotation) of the head or
camera.
For parallel views it is convenient to think of the view
plane normal as determining the direction of projection.
An object in world coordinate space, whose vertices
are can be expressed in term of
view coordinates .
- Translate the view reference point e to the origin
- Rotate about world coordinate y axis to bring the view
coordinate axis into the yz plane of world coordinates
- Rotate about the world coordinate x axis until the z axes
of both systems are aligned
- Rotate about the world coordinate z axis to align the
axis with the y
- Reflect relative to the xy plane, reversing sign of each z
coordinate to change into a left-handed coordinate system
The viewing transformation is
- Let be the view reference point.
- Let be the look-at point.
- Let be the up vector.
- Translate:
- Rotate about y:
- Rotate about x:
- Rotate about z: Identity
- Reflection:
- Composite transform V:
- Let be the eye position (view reference point).
- Let be the
``look-at'' point.
- The unit vector from eye towards look-at point
i.e. unit length view plane normal is
- Let M be a rotation matrix that maps
the view plane normal to the z axis.
Thus is the third coloumn of the matrix M.
- Let be the unit length view up vector.
The rotation
of M transforms view up vector into a vector in the
yz plane. Thus,
for some such that
where and are the second and third columns of M.
- The second coloumn of M is
- Inner product of and gives
- Thus solving for ,
- Finally, the first coloumn of M can be computed
using cross products.
(Note: (1) the order of the cross product produces a left-handed system, (2) a vector crossed with itself is zero.)
- Now that M is constructed, translate view reference point to the origin and reflect about x axis.
Thus view transformation V is given by
Proof
Its along z axis. Hence it can be concluded that
the mathematical computation is right.
- Find the viewing transformation matrix given a view reference
point of , a look-at point ,
and a view-up vector .
- Find the viewing transformation given eye position ,
look-at point and up-vector
.
- Find the viewing transformation given eye position ,
look-at point and up-vector
.
- Find the viewing transformation given eye position ,
look-at point and up-vector
.
- If and are two different rows of a rotation matrix (a) what
is their inner product, (b) what can be said about their cross
product?
Priya Asokarathinam /ADVISOR Shoaff