Description Usage Arguments Examples
This recursively split each line segment into pieces until the transformed
point is less that tolerance
away from the transformed line
segment.
1 | geometry_warp(geom, fun = c("polar", "identity"), tolerance = NULL)
|
geom |
A geometry data frame. |
fun |
A warping function to use. Currently these are hard coded because they much be implemented in C++ for performance reasons. |
tolerance |
Approximation errors below this threshold will be
ignored. If |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | spiral <- data.frame(
x = seq(0, 6 * pi, length = 10),
y = seq(0, 1, length = 10)
)
path <- render_path(spiral, ~x, ~y)
path %>% plot() %>% points()
path %>% geometry_warp("polar") %>% plot()
path %>% geometry_warp("polar", tolerance = 0.1) %>% plot() %>% points()
# Crazy example
expand.grid(x = seq(0, pi, length = 4), y = 0:3) %>%
render_tile(~x, ~y, halign = 0, valign = 0) %>%
geometry_pointificate() %>%
geometry_rotate(15) %>%
geometry_warp("polar") %>%
plot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.