import numpy as np from einsteinpy.geodesic import Timelike from einsteinpy.plotting.geodesic import GeodesicPlotter
Note that, we are working in M-Units ($G = c = M = 1$). Also, since the Schwarzschild spacetime has spherical symmetry, the values of the angular components do not affect the end result (We can always rotate our coordinate system to bring the geodesic in the equatorial plane). Hence, we set $\theta = \pi / 2$ (equatorial plane), with initial $p_\theta = 0$, which implies, that the geodesic should stay in the equatorial plane.
position = [40., np.pi / 2, 0.] momentum = [0., 0., 3.83405] a = 0. steps = 5500 delta = 1.
geod = Timelike( metric="Schwarzschild", metric_params=(a,), position=position, momentum=momentum, steps=steps, delta=delta, return_cartesian=True )
gpl = GeodesicPlotter() gpl.plot(geod) gpl.show()