ellipse: generating a closed ellipse
Description
This function is derived from `VennDiagram::ell2poly`, we modified it and then
it can generating a closed ellipse, which is a requirement for further transformation
to a POLYGON sf object.
Usage
ellipse(x = 0, y = 0, a = 2, b = 1, rotation = 0, n = 100)
Arguments
x, y
the coordinates of ellipse center
Value
a matrix representing ellipse coordinates
Examples
Run this code# NOT RUN {
# plot the default ellipse
library(sf)
library(ggVennDiagram)
ellipse() %>% st_linestring() %>% plot()
# }
Run the code above in your browser using DataLab