Explain the method of overlapping and intersecting, Data Structure & Algorithms

Assignment Help:

Overlapping or Intersecting

A polygon overlaps or intersects the current background if any of its sides cuts the edges of the viewport as depicted at the top right corner of the viewport.

The extent of a polygon overlapping the viewport is only a necessary but not sufficient condition, because even if the extent overlaps, the polygon may be disjoint, as illustrated at the top left corner of the viewport. It may be seen that only the surrounding and contained cases (a) and (b) may be decided on the basis of the simple rules of relationship between the x-y extents of the polygon and the viewport. All other cases need further investigation, as follows : 

We start with the entire viewport, and examine all the polygons for surrounding or containment. Whatever polygons can be classified as Case (a) or Case (b) can be stored or not depending on whether they are visible or not.

For any remaining polygons, the viewport is divided into four quarters, and each quarter representing a viewport segment is evaluated against the polygon portions in that quarter for cases (a) and (b). The quarter or quarters in which such determination cannot be made will again be subdivided into four further quarters each, and each quarter (which may be termed a "viewport segment") examined for the same kind of relationship decisions.

This procedure is applied with successive subdivisions until all the polygons and sub-regions can be resolved as (a) or (b). Frequently, the procedure may have to be repeated until the last quartering reduces to a single pixel. Because of the four branches formed with each quartering step, the method is also called the Quad tree method. Finally, the method illustrates the difference between hidden-line and hidden-surface algorithms. In a particular viewport segment, it may happen that there are no edges at all, but two or more surfaces are surrounding the viewport segment. Here, hidden line has no relevance, but hidden surface has. 

 


Related Discussions:- Explain the method of overlapping and intersecting

What are the example of area subdivision method, Example of Area Subdivisio...

Example of Area Subdivision Method The procedure will be explained with respect to an illustrative problem, with the image consisting of five objects, namely a triangle (T), qu

Asymptotic notation, Asymptotic notation Let us describe a few function...

Asymptotic notation Let us describe a few functions in terms of above asymptotic notation. Example: f(n) = 3n 3 + 2n 2 + 4n + 3 = 3n 3 + 2n 2 + O (n), as 4n + 3 is of

Design a binary search tree, Binary Search Tree usage: Write a progra...

Binary Search Tree usage: Write a program to compare the time taken for a search in a skewed tree, a balanced tree, and a random tree. Speci cally, your program should do the

Data communication, #question.explain different types of errors in data tra...

#question.explain different types of errors in data transmission.

C++ function, Write c++ function to traverse the threaded binary tree in in...

Write c++ function to traverse the threaded binary tree in inorder traversal

Quicksort and bubble sort algorithms, Task If quicksort is so quick, w...

Task If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your

What are the structures used in file-system implementation, What are the st...

What are the structures used in file-system implementation? Several on-disk and in-memory structures are used to execute a file system a. On-disk structure include P

What is algorithm, What is Algorithm A finite sequence of steps for a...

What is Algorithm A finite sequence of steps for accomplishing some computational task. An algorithm should Have steps which are simple and definite enough to be done

Explain the different types of traversal on binary tree, Question 1 What i...

Question 1 What is a data structure? Discuss briefly on types of data structures Question 2 Explain the insertion and deletion operation of linked list in detail Qu

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd