INTRODUCTION OF WARNOCK ALGORITHM : INTRODUCTION OF WARNOCK ALGORITHM By M.Prakash INTRODUCTION : INTRODUCTION The Warnock algorithm is a hidden surface algorithm invented by John Warnock that is typically used in the field of compute graphics.
It is based on hypothesis of the human eye-brain combination processes information contained in a scene.
The hypothesis is that very little time or effort is expended on areas that contains little information .
Consider an example, empty table top with a bowl of fruit on it. The color, texture, etc. Attention is focused on the fruit bowl. Where on the table is it located? How large it is? What kind of bowl is it? What kind of fruit does it contain? These question cannot be answered immediately, it is temporarily put aside for later consideration. Fundamentally, this is a divide and conquer strategy.
The Warnock algorithm and its derivatives attempt to take advantage of the fact that large areas of a display are similar, e.g., the top in the previous example This is know as area coherence, i.e., adjacent areas (pixels) in both the x and y direction tend to be similar. Slide 3: Specific implementation of the Warnock algorithm vary, in the method of subdividing the window , and in the details of the criteria used to decide whether the contents are simple enough to display directly.
Each window is subdivided into four equal sub windows.
Figure illustrates the progress of the simplest implementation of the Warnock algorithm in the space. Here, a window that is too complicated to display is subdivided into four equal windows. Also, a window that contains anything is always subdivided until the resolution of the display is reached.
The figure (a) shows a scene composed of two simple polygons.
(a) Slide 4: Figure (b) shows the result with the hidden surface removed. Notice that the horizontal rectangle is partially hidden by the vertical rectangle. (b) Slide 7: Figure (c) and (d) show the process of subdivision for a display resolution of 256 * 256. Since 28 = 256 ,a maximum of eight subdivisions are required to reach the resolution of the display.
If the sub windows are considered in the order lower left, lower right, upper right, upper left, then the sub windows of level 1a, labeled 2a, 4a, 4b, 4c, 5a, 5b, are declared empty and are displayed at the background intensity during the course of the subdivision. Here, the number indicates the subdivision level, and the letter the quadrant.
The first sub window examined at pixel level that contains a feature of interest is the one labeled 8a.
If a visible line algorithm is desired, then the pixel corresponding to sub window 8a is activated, because a visible edge passes through it. The result is to display the visible edges of the polygons as a series of pixel-sized dots as shown in figure (e), Slide 9: Subsequent consideration of the window labeled 8d in figure (d) best illustrates the difference between implementation as a visible line and as a visible surface algorithm.
Therefore, it is declared empty and displayed at the background intensity or color.
For visible surface algorithm, the pixel-sized window, 8d, is examined to see if it is surrounded by any of the polygons in the scene. If it is , all the polygons surrounding the pixel are tested to see which one closer to the at this pixel location.
The test is performed at the pixel center. The pixel is then displayed at the intensity or color of the closest polygon.
If no surrounding polygons are found, the pixel-sized window is empty.
Thus, it is displayed at the background color or intensity. The pixel-sized window labeled 8d is surrounded by the vertical rectangle; thus, it is displayed at the color or intensity for that rectangle. The result as shown in figure (f). Slide 11: END