 Hello friends, myself Darshan Pandit, Assistant Professor, Department of Computer Science and Engineering from Walton Institute of Technology, Solapur. So today we are going to discuss about Warnock algorithm. So the learning outcome is like at the end of the session student will be able to identify visible lines and surfaces through Warnock algorithm. So in this we will see what is Warnock algorithm, relationship of polygon and window, cotty data structure and algorithm subdivision process. So Warnock is based on hypothesis that tells how human-eye-brain combination processes information contained in a scene. So basically hypothesis is nothing but very little time or effort is spent on area of scene that contains little information. The majority of time and efforts is spent on high information content. A table top with one object has less color texture information. This takes minimal time to pursue this information. This algorithm can be implemented both in image and object space approach. So the algorithm relies on divide and conquer strategy. Algorithm and its variant take advantage of homogeneity in the area of displacing which is known as area coherence. The algorithm considers a window or area in image or object space and seeks to determine if window is empty or the content are simple enough to resolve. So if content are not simple enough to resolve then it divides the window until either the scene is simple or preset resolution is reached. So if image space results are not satisfactory the algorithm shifts to object space for better accuracy. So in this diagram you can see, so we are having in this window there are 3 polygons and polygon 1 and 2 are overlapping each other. So here we need to decide which surface is above and which surface is below. So for that purpose we are dividing this window in 4 parts. So again that 4 parts, again we are recursively dividing 4 parts into again 4 parts and then we are identifying the relationship of this object and the window. So this relationship can be given with 4 categories that is the polygon is content or inside the window, disjoint polygon, overlapping polygon and surrounding surface. So inside polygon is that which is completely inside the area of interest. So the shaded part you can see in the diagram that is nothing but area of interest. So outside surface or disjoint polygon it is a polygon that is completely outside the area that you can see in the figure B. So figure C is the polygon that is partially inside the area of interest and in figure D the polygon that is completely encloses area of interest. So these are the 4 types in which we can categorize the relationship of polygon and the window. So this diagram shows you cot tree data structure which is used to store the data. The subdivision process gives a tree structure for sub window. So it also helps a tree structure for sub window as shown in the figure. So in this figure you can see the root of the tree is the display window. Each node represent by the box contains the coordinate of lower left hand corner and the length of the side of sub window. So assuming that sub divided window are processed in the order A, B, C, D that is from left to right at a particular subdivision level in the tree. So in these active nodes at each level is indicated by heavy line. At a particular level all windows to the left of the active node are empty thus they have been previously displayed at the background color or intensity. So in this all window to be right of the active node at a particular level remain to be processed that is it is declared to be empty or it has to be subdivided. So as a tree traversed in a reverse direction. So in this diagram you can see cot tree data structure, so it is the example of cot tree data structure where we are having coordinate from 00 to 256 comma 256. So this is the window which goes into recursive subdivision process and this is how we are generating the cot tree data structure. So in this you can see the active nodes at each level which is indicated by heavy lines. So the window is divided into four equal parts and this process is repeated until eight levels until we get solution for the object. So that object can be simple enough or it can be resolved easily. So here you can pause the video and answer the question. So if there is only one intersecting or only one contained polygon then where background color and polygon color is applied. So the answer is like if there is only one intersecting or only one contained polygon then the area is first filled with the background column then the part of polygon contained in that area filled with the color of polygon. So this is the example. So the figure A shows original surface and after removing hidden surface so it is shown in the figure B. So in figure B you can identify which surface is above or which object is above and which surface is below. So to this original object so we are adding the window. So in that in the window 002 255 comma 255 so the object is added and this object is divided into four parts. The window is divided into four parts so that object also get divided into four parts. So some part of object lie in the first window that is from 00. So in this first window you can see again this first window is divided in four parts so that you will get this 2A, 2A, 2B, 2C and 2D. So again this 2A is divided into four parts so that you will get 3A, 3B, 3C and 3D. So again this window is again it is divided so that we can get the object to be resolved so that we can get simple solution for this object so that we can decide which object is above and which object is below. So again this 3A is divided again in four parts so that we will get 4A, 4B, 4C and 4D. So this is nothing but recursive subdivision process. So we go on dividing the object until we get the easier solution. So here you can see the object is divided that is the window is divided until 8A. So again this part is shown that is window 5 is again divided in four parts that is 5A, 5B, 5C and 5D. So again this 5C is divided in four parts so that we will get 6C, 6A, 6B, 6C and 6D. So again this 7C is divided in four parts. So in this way the subdivision process continues till we get simple object. So finally we will get this result so I have shown in figure E result for hidden or visible line algorithm. So in which we are identifying hidden lines and figure F results for hidden or visible surface algorithm. So this is how hidden or visible surface is identified. So you can have this black surface is on top and blue surface is below. This can be easily identified. So this is how we are implementing the Warnock algorithm subdivision process. So these are the references which are used to create this video. Thank you.