Midpoint in line

Hi Fidel,

This is a classic graphics math problem. To compute the midpoint between two points A and B, we an compute the vector between them by taking (B - A), normalizing to get the direction vector. Then multiplying this direction vector by magnitude of (B-A) multiplied by the fraction of the way we want to travel between them. Then you can just convert to Cartographic. Here’s the code for this: http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=d290d6e52cdeec93ac14c8a0aef1a8b6

You can also use linear interpolation to get an intermediate point. Let me know if you want to discuss that method also.

Hope that helps!

  • Rachel