Given two closed curves, say a circle and a square, I would first formulate the problem as a pair of functions in polar coordinates. Thus, represent these two closed curves in polar form, where we will have r as a function of theta. Once you have those relationships, the problem is absolutely trivial.
So, for a unit curcle, we have
r1 = @(theta) ones(size(theta);
For a comparable square centered at the origin, thus of side length 2, I might get trickier...
r2 = @(theta) min(1./abs(cos(theta)), 1./abs(sin(theta)));
r3 = @(theta) (r1(theta) + r2(theta))/2;
Now, all is, as I said, trivial.
theta = linspace(0,2*pi,1000);
As I said, trivial.
The problem becomes considerably less trivial if you have some fully general closed curve. For example...
pxy = randn(10,2);
pxy(end+1,:) = pxy(1,:);
You cannot dispute this is a closed curve. Yet interpolation along the curve is now a bit more problematic. Thus conversion to polar coordinates is now a bit less useful. Even a simple figure 8 curve is now less automatic. So the complexity of that closed curve is important. Can it be simply represented as a single valued parametric function in polar form? If so, then all is trivial again. If not, then you need to decide how you wish to interpolate, and what is the meaning of that mean in your complex case.
Otherwise, you are doing something possibly no more meaningful than taking the average of apples and oranges, the result may be just grape juice.