Get a spline curve along a set of points

Share:

Description

Get a spline curve along a set of points

Usage

1
getsplineG(x, y, kdiv)

Arguments

x

x-coordinates

y

y-coordinates

kdiv

number of divisions in each sections

Value

LIST:

x

x-coordinates

y

y-coordinates

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

1
2
3
4
5
6
7
8
9
plot(c(-5,5), c(-5,5), asp=1, type='n' )
ff=list()
ff$x=c(-4.850,-4.700,-3.934,-2.528, 0.603, 2.647, 3.861, 2.626)
ff$y=c(-4.045,-2.087,-0.710, 0.172, 1.291, 2.087,-0.753,-4.131)

lines(ff, col='red')
G =getsplineG(ff$x, ff$y, kdiv=20)

lines(G, col='blue')

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.