Say I have a list of coordinates in an array
{{0, 0}, {0, 1}, {1, 1}}
I'd like to create a new array where, between each pair of nearest-neighbor coordinates in the previous array, I place $k$ points equispaced on a linear interval between the points. For example, with $k = 3$ we would generate the array:
{{0, 0}, {0, 0.25}, {0, 0.5}, {0, 0.75}, {0, 1}, {0.25, 1}, {0.5, 1}, {0.75, 1}, {1, 1}}
Is there a nice one-liner for doing this?
Insert[]
? $\endgroup$