I have a series of xyz data in a unit cube. It forms a sort of tapered & curved cylinder. It will begin and end at 0,0,0 and 1,1,1. I want some sort of best fit curve down the 'axis' of this shape. And I need to take a new xyz point and map/project it onto this best fit curve. If I was expecting a straight line, I'd use the first principal component, but in this case I'm almost certain that I want some kind of 3d spline. I'm not after a fit to the surface. To be clear, there is no response variable; it's just xyz data points, so a model is not what I need.
Can someone give me some suggestions for the name of what I want to do? I need some keywords to get me going. I'm working in R so if you can suggest a package even better. Alternatively, perhaps something in Matlab would work. But mostly I need to know what this process is called. Thanks.