# Line Clipping in 3D: Overview, Techniques and Algorithms
## 2 Three-Dimensional View Volumes and Clipping Regions  
For two-dimensional graphics, viewing operations convert positions in the world coordinate plane to pixels in a screen or any other output device. Using rectangular boundaries for the clipping window, a clipping process clips a two-dimensional scene and maps it to device coordinates. Three-dimensional viewing operations are more complicated because there is an extra dimension and involves some tasks that are not present in two-dimensional viewing. To create a display of a three-dimensional world coordinate scene, one must first set up a coordinate reference for the viewing parameters (also known as the camera). This coordinate reference defines the position and orientation for a view plane (or projection plane) that corresponds to a camera film plane [1] (see Figure 3). The vertices that make up the object are then converted to the viewing reference coordinates and projected onto the view plane.  
Unlike a camera picture, there are different methods for projecting a scene onto the view plane. One method for getting the description of a solid object onto a view plane is to project points on the object's surface along parallel lines. This technique, called _parallel projection_, is mostly used in engineering and architectural drawings to represent an object with a set of views that show accurate dimensions of the object. Another method for generating a view of a three-dimensional scene is to project points to the view plane along converging paths. This process, called _perspective projection_, causes objects farther from the viewing position to be displayed smaller than objects of the same size that are nearer to the viewing position. A scene that is generated using a pers  
Figure 1: (**a**) Before and (**b**) after application of line clipping in two dimensions.  
Figure 3: Obtaining a selected view of a three-dimensional scene (camera).  
Figure 2: A line in the three-dimensional space after clipping.  
more realistic because this is the way that our eyes and a camera lens form images. Parallel lines along the viewing direction appear to converge to a distant point in the background, and objects in the background appear to be smaller than objects in the foreground (see Figure 4).  
Most of the time, the view volume is either a rectangular parallelepiped, i.e., a box or a cuboid, or a frustum pyramid. Both of these shapes are six-sided with the following sides: left, right, top, bottom, near (hither), and far (yon); see Figure 5.  
After the specification of the type of view volume, various strategies can be used to implement the viewing process depending on the view volume and the 3D scene. A conceptual model could be similar to the one in Figure 6: the view volume is used as a clipping region to discard the unnecessary out-of-boundaries components of the three-dimensional scene. The remaining components are then projected onto the projection plane. Finally, the projection plane is transformed into two-dimensional device coordinates.  
Unfortunately, if the viewing is perspective and the volume is a frustum, it can be computationally expensive to check if objects exist inside the boundaries and perform clipping; see Figure 7.  
Figure 4: (a) Line AB and its perspective projection A’B’. (b) Line AB and its parallel projection A’B’.  
Figure 5: Types of view volume: (a) rectangular parallelepiped, (b) truncated pyramid also known as a frustum.  
Figure 6: Conceptual model of the three-dimensional viewing process.  
In order to simplify and speed up the clipping process, an extra stage is added to the above model; see Figure 8. Before clipping and projection stages, the frustum is firstly transformed into a normalized canonical view volume. Clipping and hidden surface calculations are then applied (Figure 9).