smooth.spline.poly | R Documentation |
See: https://gis.stackexchange.com/a/24929
smooth.spline.poly(xy, k = 3, dof = 5, ...)
xy |
A data.frame with ordered X/Y pairs representing the polygon |
k |
The amount of points used to "close" the path, and prevent discontinuous derivatives at the end-points. |
dof |
The degrees of freedom used by |
Splining a polygon with stats::smooth.spline
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 a data.frame of points.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.