Increases the number of points defining a shape by placing uniformly spaced points between existing points.
[x_new,y_new] = interpolate_shape(x,y,n)
[x_new,y_new] = interpolate_shape(x,y,n) returns a new set of points stored in the vectors
y_new given an original set of points stored in the vectors
y. The new set of points has
n points evenly spaced between the points stored in
y. The new set of points also includes the original points stored in
Tamas Kis (2021). Interpolate Points on a Shape (interpolate_shape) (https://github.com/tamaskis/interpolate_shape-MATLAB/releases/tag/v1.0.1), GitHub. Retrieved .
That is an interesting definition of "uniformly spaced": the spacing is different for each line segment!
You might be interested in this general solution which actually provides uniform spacing over the *entire* line and supports different interpolation methods: https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!