Rotating jamming case -- shortest strip

Source: Internet
Author: User
Shortest strip

Consider the following device placement problem: a set of "consumer group" is a family with an individual surface convex polygon.FGiven. Our goal is to find a "device" and a straight line on the plane to minimize the maximum distance from the line to the consumer.

The last point must be clarified. The distance between a straight line and any polygon is the minimum orthogonal distance from the point on the polygon to the line. Therefore, the distance from each polygon to the line is unique.
Now, each polygon member in the family and a straight line on the plane are given, and each polygon has a distance to the line. Therefore, there is a maximum line-polygon distance for the entire family. This distance also depends on the polygon between the line and each family member.
The goal of this problem is to give a specific family member polygon set and find the line that minimizes the maximum distance. This problem also exists in other versions. It is common to find a line to minimize the distance or polygon weight distance and minimum.

The conclusion here is made by Robert and Toussaint in 1990.
The main problem is equivalent to finding a band with the smallest width (an area with two parallel lines at the boundary on a plane) and having intersection with all family members polygon. Therefore, the center of the belt (the line parallel to the line with the line of the line) is the line that is required to minimize the maximum distance.

To discuss this issue, we define the following:

A straight line on the planeLThe equation isAx+By+C= 0 (andB> 0 orA=-1) divide the plane into two areas: the upper half planeHu(L).P= (Px,PY) MeetRetrial+Apy+C> = 0 and lower half planeHl(L).P= (Px,PY) MeetRetrial+Apy+C<= 0.
According to the above definition, if the line is straight, the upper half plane isXThe negative direction of the axis.

Furthermore, a band can be defined as the intersection of the upper half plane of a line and the lower half plane of another (parallel) line.

Returns a convex polygon.P, A direction angleTheta, Lower tangentTL(P,Theta) IsXThe angle between the axis and the Half Axis isThetaLine, he andPIntersection andPInTL(P,Theta. The intersection (maybe more than one) is called the lower vertex.
Similarly, the top tangent and top vertex are defined.
Given a family polygon set and a fixed direction angle, a lower vertex set and the upper vertex set are determined.

Finally, consider the following conclusions:
Given familyFPolygon set, and a direction angle.Theta, A beltS(Hu(L1) andHl(L2) If the intersection is greater than 0, the result is "yes ".F(In this direction) Minimum Width band, if and only ifFThere are two polygonPAndQYes

  • PAndHu(L1)L1.
  • QAndHl(L2)L2.

The main conclusion is: a familyFThe smallest width band of a convex polygon set (a given directionTheta)L1 andL2. Confirm when
L1 =TL(Ch(Up(F,Theta)),Theta) And
L2 =Tu(Ch(Lp(F,Theta)),Theta.

A family's convex polygon set and the minimum bandwidth at a given angle. The convex hull of the lower vertex and the upper vertex. Note that the intersection of two polygon and band appears only on one vertex.


Therefore, as long as the sequence of the lower vertex and the upper vertex of the Family polygon set is determined, the upper and lower width bands in the given direction can be obtained by calculating the convex hull. As Robert and Toussaint explained, fortunately, these convex packets do not need to be completely re-computed every time: they need to be updated. In fact, consider two approaching directions: Many (or all) polygon have the same top and bottom vertices for both directions. This result also implies that only the limited direction (when the current vertex or the top vertex changes) needs to be detected.

The focus here is on the rotating jamming model, not the details of the algorithm. This article intends to use the rotating jamming case to calculate the top and bottom vertices of a polygon. The following describes the main implementation process of the algorithm. Returns a convex polygon.P:

  1. Find minimum and maximumYCoordinates. MarkPAndQAnd construct a horizontal tangent through them.
  2. Rotate the tangent counterclockwiseThetaUntil one of them is parallel to the other side of a polygon.
  3. If the vertex isPAfter being hit (in the clockwise direction ),PIt means that the angle is 0 (inclusive) to the angleTheta(Not included. If the vertex isQThenQIs the top vertex within the same angle range. These two cases may also occur when the side is parallel.
  4. Update the current vertex as the new vertex and update the current angle.
  5. Repeat steps 2 to 4 and follow the new angle interval to know that the new angle is equal to 180 degrees (at which point, first go back to the original position, but at this time, the order is reversed ).

A line is parallel to an edge of a polygon.Critical direction. They only change at the top and bottom vertices. For a critical direction, because the line passes through two vertices, when the clockwise rotation is performed, the vertex or one of the top vertices is defined as a point of intersection between the polygon and the line.

Once the critical direction (given in order) is obtained, a band can be calculated in the first direction. Then, at least one of the top or bottom vertices is updated in the second critical direction. Therefore, the convex hull needs to be updated instead of re-computed. Once the preceding steps are completed, the new band is successfully constructed and Its width (orthogonal distance between boundaries) is calculated. Repeat this operation for all critical directions. Note that if an F band with a width of 0 is generated at any point, this process can be terminated by finding a line that passes through all the home polygon.

For the complete algorithm description, correctness discussion, and running time analysis, see the author's paper:

J.-M. Robert, G. T. Toussaint. Computational Geometry and facility location.Proc. internatioanl Conf. On Operations Research and Management Science, Manila, the Philippines, Dec-15,199 0. PP B-1 to B-19.

 

Original article address:Http://cgm.cs.mcgill.ca /~ Orm/thstrip.html

 

Please indicate the source for reprinting. Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.