spline.poly | R Documentation |
stats::spline
whuber's spline.poly as shared in StackExchange
spline.poly(xy, vertices, k = 3, ...)
xy |
A data.frame with ordered X/Y pairs representing the polygon |
vertices |
The amount of vertices in the final smoothing/interpolation. |
k |
The amount of points used to "close" the path, and prevent discontinuous derivatives at the end-points. |
See: https://gis.stackexchange.com/a/24929
The rows of 'xy' give coordinates of the boundary vertices, in order. 'vertices' is the number of spline vertices to create. (Not all are used: some are clipped from the ends.) 'k' is the number of points to wrap around the ends to obtain a smooth periodic spline.
Returns an array of points.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.