Determine relevancy and relative position of two polygons, Data Structure & Algorithms

Assignment Help:

Comparison Techniques

There are several techniques for determining the relevancy and relative position of two polygons. Not all tests may be used with all hidden-surface algorithms, and some of the are not always conclusive. Sometimes we can use simple tests for many of the cases and resort to more costly tests only when all else fails. 

One technique that is often useful is called the minimax test or boxing test. This test checks if two polygons overlap. The test provides a quick method to determine if two polygons do not overlap. It surrounds each polygon with a box by finding its extents (minimum and maximum x and y coordinates) and then checks for the intersection for any two boxes in both the X and Y directions. If two boxes do not intersect, their corresponding polygons do not overlap. In such a case, no further testing of the edges of the polygons is required.

If the minimax test fails (two boxes intersect), the two polygons may or may not overlap, as shown in Figure 3.10. Each edge of one polygon is compared against all the edges of the other polygon to detect intersections. The minimax test can be applied first to any two edges to speed up this process.

The minimax test can be applied in the Z direction to check if there is no overlap in this direction. In all tests, finding the extents themselves is the most critical part of the test. Typically, this can be achieved by iterating through the list of vertex coordinates of each polygon and recording the largest and the smallest values for each coordinate.

 

1477_data structure.png


Related Discussions:- Determine relevancy and relative position of two polygons

Explain open addressing, Open addressing The easiest way to resolve a c...

Open addressing The easiest way to resolve a collision is to start with the hash address and do a sequential search by the table for an empty location.

Linked list, how to creat atm project by using linked list?

how to creat atm project by using linked list?

State the ways to construct container taxonomy, State the ways to construct...

State the ways to construct container taxonomy There are several ways that we could construct our container taxonomy from here; one way that works well is to make a fundamental

Sorting, compare and contrast the bubble sort,quick sort,merge sort and rad...

compare and contrast the bubble sort,quick sort,merge sort and radix sort

R. Studio, I need a person who has a good background in using R. Studio? I...

I need a person who has a good background in using R. Studio? In adition, a person who is good in using algorithms.

Queues, what is queues? how it work? and why it used? i want an assignment...

what is queues? how it work? and why it used? i want an assignment on queue .....

Linked lists, what are grounded header linked lists?

what are grounded header linked lists?

Explain decision tree, Decision Tree A decision tree is a diagram that ...

Decision Tree A decision tree is a diagram that shows conditions and actions sequentially and therefore shows which condition is to be considered first, second and so on. It is

Algorithm for inorder traversals, Step-1: For the current node, verify whet...

Step-1: For the current node, verify whether it contain a left child. If it has, then go to step-2 or else go to step-3 Step-2: Repeat step-1 for left child Step-3: Visit (th

Write a program to create a heap file, Write a program to create a heap fil...

Write a program to create a heap file that holds the records in the file " data_2013 " The source records are variablelength.However, the heap file should hold fixed-length reco

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