In general relativity, a particle with a mass is understood as the source of gravitation by curving the space time around it. "Stress energy momentum can be thought of as the relativistic generalization of mass."
Geodesic equations describe curved space time, where its tangent vectors are parallel, even after being transported in curved path. The visualizations on the right depict cosmic scale space-time geometry by sending parallel beams of light into the effective space. Lines in 2D and pipes in 3D represent parallel light traveling into the observed space. From the perspective of each photon particle, it is traveling “straight.”