Perspective Shear-Warp Factorization
The perspective Shear-Warp Algorithm produces an image that shows the orthogonal projection of the volume in its current position.

For perspective shear-warp factorization again the viewing matrix has to be determined from the view-, up- and right vectors. This is similar to orthogonal factorization. Again a matrix is computed that rotates the given vectors into the right position. For perspective viewing additionally the projection to the image-plane has to be considered.

The distance between the eye-point and the projection plane can be changed by the user with a scrollbar. However when this distance is chosen to be very small aliasing effects occur. On the other hand, increasing the distance leads to the fact that the perspective algorithm produces images that seem to be the result of orthogonal viewing.

What problems come up with the situation that the eye-point is too close to the volume is explained in detail in [2]. Lacroute suggests to split up the volume in several parts and render them separately, which has not been done in my implementation.

The projection matrix used for this implementation casts points in space into the XY-plane and is of the following form:

In the above figure d is the distance between the eye and the origin of the coordinate system. At the same time the origin of the coordinate system is defined as the center of the volume.

To get the final viewing matrix for perspective viewing, simply the viewing matrix computed for orthogonal viewing has to be multiplied by the above projection matrix. The result is the viewing matrix for perspective viewing that transforms a point of the object coordinates of the volume into a point in the final viewing plane.

The factorization of the viewing matrix is similar to the factorization for orthogonal viewing. One important difference is that the shear matrix this time not only performs shearing but also scaling of the slices. A result of this is that now the first slice of the volume after shearing and scaling gets a greater size than the grid of the projection plane. That happens because all slices in front of the projection plane are scaled with a factor greater than 1. So all slices are scaled with the inverse of the scaling factor of the first slice to avoid that one sample of the volume covers more than one pixel in the projection plane.

The following image shows the complete factorization of the perspective projection:

Factorization of the perspective viewing matrix

back main next