How warped spacetime bends trajectories of light and moving objects? I fail to see why the light follows something like the blue line and not the green line on the attached image.



*

*Figure 1 - light bends around warped spacetime


Afaik. something similar happens with Earth when it cannot escape from the space warped by the Sun. Otherwise it would leave the Solar System on a straight line.
 


*

*Figure 2 - Sun bends the spacetime around itself, so Earth cannot escape - ref
I thought about these space warps. Maybe I am wrong, but I think it is possible to describe them with 4d coordinates, where the 4th dimension is the warp of the spacetime, or the depth of the gravity well, or something like that.



*

*Figure 3 - Travel in warped spacetime with 4 coordinates


So if we are traveling through warped spacetime, we experience that the distance is longer and the trip takes more time than we expected, because we travel in the 4th dimension as well, not just in the regular 3 dimensions. But with this model we should not end up in a different region of space than we planned if we go forward on a straight line.
What am I missing?
Note that I have not a clue about physics, so please try to explain it on a human language! xD
 A: The main idea is that it follows the path of least resistance.  The light "wants" to travel the shortest path, which is (almost) always a straight line.  However, since spacetime is curved, this straight line happens to be curved as well!  Shown in the image are two hypothetical light paths, one that follows the curvature of spacetime and one that doesn't.
Consider the drawing on the left first.  Initially, it might appear that the one that goes straight (the yellow line) would be travelling the shorter distance, because it looks like a straight line on the chalk board.  However, it isn't a straight line, because the spacetime it's in is curved.  Likewise, while the red line appears to be longer, it's not, because it's actually following the straight line in the spacetime that it's in.
If we "uncurve" the spacetime, we can clearly see that the yellow line is actually the longer of the two.  Since the light "wants" to minimize the distance it travels, it'll end up taking the red line's path.  The reason that it "wants" to take the shortest path is beyond my ability to explain, but it can be solved using the Variational Principle.

A: I think once you accept that gravity can bend space-time, it is straightforward to accept that light will just follow these curved lines.
the real question to me is why can gravity bend space time ? I mean, I fully understand that when considering two mass bearing objects but it is harder to comprehend when we talk about electromagnetic waves...i think if this mechanism would be understood, that would pave the way of unifying the gravity with electromagnetism  
