powered by
Given a polygonal pattern and a polygonal path, generate the Minkowski Sum by adding the pattern to the path.
minkowskiGrob(A, B, grobFn=xyListToPath, name=NULL, gp=gpar(), ...) grid.minkowski(A, B, ...)
minkowskiGrob returns a gTree.
minkowskiGrob
grid.minkowski is only used for its side-effect of drawing on the current graphics device.
grid.minkowski
A grob, gList, or gTree, or a gPath or a character value identifying a grob that has already been drawn. This is known as the pattern grob.
A grob, gList, or gTree, or a gPath or a character value identifying a grob that has already been drawn. This is known as the path grob.
The function that is used to create the final grob result. Predefined options are: xyListToPath, xyListToPolygon, and xyListToLine.
xyListToPath
xyListToPolygon
xyListToLine
A name for the resulting grob.
Graphical parameter settings for the resulting grob.
For minkowskiGrob, arguments passed on to polyclip::polyminkowski.
polyclip::polyminkowski
Jack Wong
Both A and B should not contain self-intersections, though they can be non-convex.
A
B
xyListToPath, xyListToPolygon, xyListToLine, polyminkowski
polyminkowski
pattern <- circleGrob(x = 0, y = 0, r = .1) path <- rectGrob(width = 0.5, height = 0.5) minkowski <- minkowskiGrob(pattern, path) grid.draw(minkowski)
Run the code above in your browser using DataLab