However, rendering the volume from any viewing direction is a complicated
task. Ray casting was implemented for arbitrary viewing direction
in the xy-plane by rotating the image plane around the z-axis by
.
Direction cosines were used to implement this feature (Sal99). Direction
cosines generalize well from two dimensions to three.
However, only the two dimensional representation was implemented.
The idea is that image plane is rotated by an angle
around the z-axis, the ray direction is computed perpendicular
to the image plane.
For each voxel a ray is cast in the view direction and unit samples located
along the ray are calculated and the gridpoints around each sample are trilinearly
interpolated in order to get the values at the sample point.