  We present recent developments on numerical algorithms for computing photon
and particle trajectories in the surrounding of compact objects. Strong gravity
around neutron stars or black holes causes relativistic effects on the motion
of massive particles and distorts light rays due to gravitational lensing.
Efficient numerical methods are required for solving the equations of motion
and compute i) the black hole shadow obtained by tracing light rays from the
object to a distant observer, and ii) obtain information on the dynamics of the
plasma at the microscopic scale. Here, we present generalized algorithms
capable of simulating ensembles of photons or massive particles in any
spacetime, with the option of including external forces. The coupling of these
tools with GRMHD simulations is the key point for obtaining insight on the
complex dynamics of accretion disks and jets and for comparing simulations with
upcoming observational results from the Event Horizon Telescope.
