Description Usage Arguments Details Value See Also Examples
Reflect geometric objects across a reflection axis.
1 | gt_reflect(obj, angle, fid = NULL, update = TRUE)
|
obj |
[ |
angle |
[ |
fid |
[ |
update |
[ |
The reflection axis is a straight line that goes through the plot origin with the given angle, where positive angles open towards the positive y-axis and negative angles open up towards the negative y-axis.
geom
of the reflected obj
.
Other geometry tools:
gt_filter()
,
gt_locate()
,
gt_pull()
,
gt_rotate()
,
gt_scale()
,
gt_skew()
,
gt_stretch()
,
gt_translate()
1 2 3 4 5 6 7 8 9 10 11 | # reflect several features
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_reflect(obj = gtGeoms$polygon, angle = 45,
update = FALSE)
visualise(newPoly, linecol = "green", new = FALSE)
# reflect a single feature
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_reflect(obj = gtGeoms$polygon, angle = 90, fid = 2,
update = FALSE)
visualise(newPoly, linecol = "green", new = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.