I'm trying to find the best fit closed curve to a scatter plot. I have no clue where to start. The points come from GPS coordinates that are sequential so just doing plot(x,y) will not give me what I need. Here are a couple examples of what the data could look like (black dots) and the type of curve I'm trying to produce. It could make any arbitrary shape. Also since the dataset comes from GPS coordinates of a paths continually taken, the path could potentially overlap itself. In essence, I'm trying to get the "average route" taken from a plot of the same route taken continuously.