Advanced maths

Minkowski sum calculator for two convex polygons

Construct the Minkowski sum of two ordered convex polygons, returning its boundary, area and perimeter without treating it as union or intersection.

Your numbers

3–40 decimal vertices in boundary order. Either orientation and a repeated closing point are accepted.
Both boundaries must be simple and convex; straight boundary subdivisions are allowed.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A Minkowski sum adds every point of one set to every point of the other. For convex polygons, taking the convex hull of all pairwise vertex sums constructs the complete boundary. This bounded implementation uses that direct geometric identity, retaining the resulting counterclockwise hull and computing its area and perimeter. It is a different set operation from a union, common overlap or scalar offset. Both input boundaries are validated as simple convex polygons; a concave shape is rejected rather than silently replaced by its convex hull.

THE FORMULAA⊕B={a+b:a∈A,b∈B}; for convex polygons, A⊕B=conv{aᵢ+bⱼ for all vertex pairs}.

A worked example

Let A be the rectangle with vertices (0,0),(2,0),(2,1),(0,1), and B the triangle (0,0),(1,0),(0,1). The sum boundary is (0,0),(3,0),(3,1),(2,2),(0,2). Its area is 5.5: it fills a 3-by-2 rectangle except for the upper-right triangle of area 0.5. The slanted boundary edge comes from the triangle’s slanted edge; the result is not merely a larger axis-aligned rectangle. Its perimeter is 8+sqrt(2).

Good to know

Two ordered simple convex polygon boundaries with 3–40 decimal vertices each. Coordinates follow the bounded six-decimal planar parser. Clockwise input, a repeated closing point and collinear boundary subdivisions are accepted. Nonconvex or self-intersecting boundaries are rejected. Uses all vertex-pair sums and a high-precision orientation hull; lengths are numerical. No holes, nonconvex decomposition, circular-radius offset or configuration-space collision decision is inferred.

Convexity makes the vertex-pair construction complete

Every point in a convex polygon is a convex combination of its vertices. Adding a point from each polygon gives a convex combination of pairwise vertex sums, so no other extreme point is needed. Conversely, each vertex sum lies in the Minkowski sum, which is itself convex. These two containments justify the complete hull construction rather than treating a sampled list of sums as a visual approximation.

The direct method costs more than merging sorted edge directions, but the supported forty-vertex bounds keep its finite candidate set small and transparent. Duplicate and nonextreme sums disappear from the output hull. A straight subdivision on an input edge does not change the set and therefore does not change the mathematical result. The output lists actual boundary corners rather than preserving every original row as a new corner.

A rectangle plus a triangle produces a five-corner convex sumWidth: 32Five sum cornersArea: 6 − 0.5Area = 5.5
A=[0,2]×[0,1], B=conv((0,0),(1,0),(0,1)). Their sum has boundary (0,0),(3,0),(3,1),(2,2),(0,2), area 5.5 and perimeter 8+sqrt(2). The cut corner distinguishes it from a 3-by-2 rectangle.

Coordinate placement changes the sum in a predictable way

Translating one summand translates the result by the same vector. Centering both inputs without permission would therefore change the requested output, even if its area stayed the same. The calculator uses the supplied coordinates directly. Minkowski addition is commutative as a set operation, so swapping the two inputs should preserve the boundary set up to cyclic order, which provides a useful independent check.

In motion planning, a configuration-space obstacle often uses one shape reflected through the origin before addition. This page does not apply that reflection automatically; the formula displayed is A plus B. The Convex polygon offset and inset calculator applies a scalar edge-distance construction, while a sum with an arbitrary second polygon carries that polygon’s directional shape. Area, perimeter and bounding extent alone cannot establish that two such set operations are equivalent.

A few questions, answered

Can the inputs overlap or be far apart?

Yes. Their coordinate sets are added, not intersected. Overlap is irrelevant to whether the convex Minkowski sum is defined.

Why is a concave boundary rejected?

Taking its convex hull would fill regions absent from the requested summand and change the answer. This page explicitly supports convex polygons only.

Find your calculator

Start typing to explore the library.