Skip to contents

The minkowski sum is the point-wise sum of two polygons. Practically it means that you trace one polygon around the boundary of the other, expanding the polygon into the covered area.

Usage

minkowski_sum(P, Q)

Arguments

P

A polyclid_polygon vector that should be expanded

Q

A polyclid_polygon vector to trace around P

Value

A polyclid_polygon vector

See also

Other minkowski sum functions: minkowski_offset()

Examples


poly <- polyclid::denmark()

# Expand Jutland by tracing the Island of Bornhold around it

# First we should center Bornholm on the origin.
bornholm <- transform(poly[7], affine_translate(-vec(centroid(poly[7]))))
plot(minkowski_sum(poly[1], bornholm))