Geodesy: how to calculate the straight line distance between two locations, which is represented by longitude and latitude?

Hey, do you know how to get the geodesic line data (x,y,z)[lon,lat,alt] between two points coordinates?, I would like to have the data and then plot it with whatever library I wish, as you mentioned before.