Rotating jamming case -- convex polygon Vector Sum

Source: Internet
Author: User
Convex Polygon vector and

Two convex polygon on a given planePAndQ,PAndQAnd is recordedP+QDefinition:

P+ Q= { P+ Q} All PAnd QOf PAnd Q.
Polygon vectors and Minkowski counts are also called in motion planning.

Considering the above definition, many questions can be raised through the query set.P+QAnd its nature. The subordinate results help us describe the polygon vectors and.

    1. P+QIs a convex polygon.
    2. Vertex setP+QYesvertex setPAndQAnd.
    3. Vertex setP+QYesPAndQParallel vertex set.
    4. GivenMAndNVertexPAndQ,P+QNo moreM+NVertex.

At last, the subordinate conclusions not only describe this problem, but also provide an incremental Calculation Method of vector sum for each vertex.
GivenP+QK vector of the SetZ(K) To meetZ(K) =P(I) +Q(J). Constructed inP(I) AndQ(J. The two lines areP(I) AndQ(J).Theta(I) AndPhi(J) (As shown in)

Therefore, the next vectorZ(K+ 1) equal:

    • P(I+ 1) +Q(J) IfTheta(I) <Phi(J)
    • P(I) +Q(J+ 1) IfTheta(I)>Phi(J)
    • P(I+ 1) +Q(J+ 1) IfTheta(I) =Phi(J)

 

 

 

 

 

 

 

 

The following polygon and their vectors are used as an example.

 

Two convex polygon. The edges of the first polygon are marked in red, and those of the second polygon are marked in blue.



 

 

Returns the Vector Sum of the polygon. The edge color is the same as that of the original polygon.


With the above results, we can easily constructAlgorithmTo compute the vector and. The first vector can be the sum of the boundary vectors in a given direction (for exampleYNegative axis direction ). After the tangent is constructed, it is updated in the calculation angle, and the next point is very clear. All we need to do is rotate the two lines at the same time to the new position to determine the new angle.

The correctness of the algorithm comes from the main conclusion; it is linear time complexity, because each step only has one required vector and the vector in the set is determined, and they only haveM + nSo the total running time isM + n.

 

Original article address:Http://cgm.cs.mcgill.ca /~ Orm/vecsum.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.