This is easier explained with pictures. I have these green points:
And I want to get a few points along this red line:
This is a top view, but I have complete XYZ coordinates for each point. I also have which vertex is connected to which other vertex.
It almost seems like you could just take the midpoint of each of those green edges and draw a line through them but you can see how that wouldn't really work near the end.
Is there an algorithm I can use to find a line of best fit through these 3D points?
I'm using Three.js if that makes a difference.