grid.minkowski | R Documentation |
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, ...)
A |
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. |
B |
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. |
grobFn |
The function that is used to create the final grob result.
Predefined options are: |
name |
A name for the resulting grob. |
gp |
Graphical parameter settings for the resulting grob. |
... |
For |
Both A
and B
should not contain self-intersections,
though they can be non-convex.
minkowskiGrob
returns a gTree.
grid.minkowski
is only used for its side-effect of drawing
on the current graphics device.
Jack Wong
xyListToPath
,
xyListToPolygon
,
xyListToLine
,
polyminkowski
pattern <- circleGrob(x = 0, y = 0, r = .1)
path <- rectGrob(width = 0.5, height = 0.5)
minkowski <- minkowskiGrob(pattern, path)
grid.draw(minkowski)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.