polyminkowski: Generate Minkowski Sums on Coordinates

View source: R/minkowski.R

polyminkowskiR Documentation

Generate Minkowski Sums on Coordinates

Description

This function generates the Minkowski Sum of two sets of coordinates.

Usage

polyminkowski(A, B, ...)
## S3 method for class 'grob'
polyminkowski(A, B, closed=isClosedShape(B),
         reduceA = "union",
         reduceB = "union",
         ...)
## S3 method for class 'gList'
polyminkowski(A, B, closed=isClosedShape(B),
         reduceA = "union",
         reduceB = "union",
         ...)
## S3 method for class 'gPath'
polyminkowski(A, B, closed,
                         strict=FALSE, grep=FALSE, global=FALSE,
         reduceA = "union",
         reduceB = "union",
         ...)
## S3 method for class 'character'
polyminkowski(A, B, closed,
                             strict=FALSE, grep=FALSE, global=FALSE,
         reduceA = "union",
         reduceB = "union",
         ...)

Arguments

A

A set of coordinates describing a pattern shape. Or a grob, gList, or a gPath (or a character value) identifying a grob that has already been drawn from which coordinates are generated.

B

A set of coordinates describing a path shape. Or a grob, gList, or a gPath (or a character value) identifying a grob that has already been drawn from which coordinates are generated.

closed

A logical value indicating whether the B coordinates describe a closed shape or an open shape.

reduceA, reduceB

A character value describing the operation to be used if either A or B need to be reduced to a single set of coordinates. One of "intersection", "minus", "union", or "xor", in which case polyminkowski is used to reduce multiple shapes, or "flatten", in which case coordinates for all shapes are returned.

strict, grep, global

Arguments controlling the interpretation of the gPath (passed to grid.get).

...

Arguments used by methods.

Details

The shape described by the pattern coordinates is added to the shape described by the path coordinates.

Value

The result is a new set of coordinates.

Author(s)

Paul Murrell

See Also

grid.minkowski

Examples

c <- circleGrob(x=0, y=0, r=.1)
r <- rectGrob(width=.5, height=.5)
polyminkowski(c, r)

gridGeometry documentation built on Sept. 11, 2024, 8:41 p.m.