1 Introduction

When an electromagnetic (EM) field interacts with a strong gravitational field, its characteristics (such as frequency, amplitude, and propagation direction) are affected by the curvature of the space-time. The great interest in studying the behavior of the EM waves’ propagation in different gravitational fields motivated the efforts of some research groups towards the development of EM-gravity analog models conformally settled in flat space-times in order to investigate gravity through an alternative point of view and with very handy tools, which can be reproducible and built up in laboratory. In order to inquiry the curvature properties of the underlying space-time we study the geodesic orbits followed by both photons and massive bodies when they are in free-fall and only gravity is acting on them, neglecting thus other minor perturbing effects.

The first idea of this conformal EM-gravity analogue pattern can be traced back to Eddington, who in 1920 thought to describe the light deflection effects from the Sun’s gravitational field by treating it as it was a refractive medium [1]. This concept was better mathematically worked out in 1960 by Plebanski [2], who presented, for the first time, an EM model of the gravitational field based on a set of suitable dielectric permittivity and magnetic permeability tensors.

There are several international research groups aiming at reducing the computational times for calculating the photon trajectories starting from static and spherically symmetric space-times. These developments permit to inquire gravity and compact object physics, such as black holes (BHs) and wormholes (WHs), via numerical imaging, where theoretical results can be benchmarked with those furnished by the Event Horizon Telescope Collaboration [3,4,5,6,7].

In 1979 Luminet provided the first ever numerical image of the optical appearance of a Schwarzschild BH surrounded by a thin accretion disk [8]. Beloborodov [9], La Placa et al. [10], and Poutanen [11] presented different and very accurate approximated expressions of photon geodesics in the Schwarzschild geometry. Also De Falco and collaborators approximated photon geodesics in Schwarzschild BH, but introducing a mathematical method to obtain polynomials [12] and then tested different theories of gravity through ray-tracing procedures [13]. Bao et al. [14] and Aldi and Bozza [15] employed geodesics in the estimation of emission lines from the accretion disk around a BH. Johannsen and Psaltis [16, 17] introduced a framework to test the no-hair theorem via electromagnetic observables [i.e., spectrum emission lines from accretion disks, measurement of the Inner Most Stable Orbit (ISCO), and BH images], which they estimated by numerically integrating the geodesics. Bakala et al. [18] computed the optical appearance of a Schwarzschild–de Sitter BH. Fernández-Núñez and Bulashenko [19] applied a conformal transformation to mimic the Schwarzschild BH space-time with metamaterials. In [20], the authors presented and validated a method for computing null geodesics in General Static Isotropic Metrics (GSIMs) by applying a Conformally Flat Space-time Transformation (CFST), based on the Snell’s refraction law and isotropic coordinates, particularizing therefore the Plebanski’s results to isotropic EM materials.

Regarding the last work, in this paper we aim to extend those goals by applying the aforementioned strategy to different BH and WH metrics by also discussing about the numerical approximation errors and calculating the apparent image of an Ellis WH. Our methodology might represent an interesting tool to understand and study gravity via feasible EM apparati. This article is organized as follows: in Sect. 2 the theoretical background and the proposed ray-tracing algorithm are presented; in Sect. 3, we show the outcomes of our approach; finally in Sect. 4, we discuss the obtained results and draw the conclusions.

2 Methods

2.1 The general static isotropic metric

In General Relativity (GR), the features of a space-time geometry are encoded in the metric tensor \(g_{\alpha \beta }\). The GSIM describes static and isotropic gravitational fields, namely, they are independent from the coordinate time \(x^0 = t\) and depend only on the radial coordinate [21]. Their line element, \(d s^2 = g_{\alpha \beta } dx^{\alpha } dx^{\beta }\) (where Einstein’ summation convention is used), expressed in spherical coordinates \((t,r,\theta ,\phi )\), geometric units (\(c= G =1\), where c is the speed of light in vacuum and G is the gravitational constant), and signature \((-,+,+,+)\) reads as

$$\begin{aligned} ds^2 = - g_{\textrm{tt}}(r) dt^2 + g_{\textrm{rr}}(r)dr^2 + r^2( d\theta ^2 + \sin ^2 \theta d\phi ^2), \end{aligned}$$
(1)

where \(g_{\textrm{tt}}(r)\), \(g_{\textrm{rr}}(r)\) are two unknown positive functions (depending only on the radius, r), whose explicit expressions allow to determine the background space-time geometry.

2.2 Photon geodesic equations in GSIM

In GR, the null geodesic trajectories represent the minimal path connecting two points followed by photons on the space-time background. They can be obtained via the Euler–Lagrange equations \(\frac{{\textrm{d}}}{{\textrm{d}} \lambda }\left( \frac{\partial {\mathcal {L}}}{\partial \ \dot{x}^ \alpha }\right) -\frac{\partial {\mathcal {L}}}{\partial \ x^ \alpha }=~0\), where \(x^\alpha \) are the coordinates, \(2{\mathcal {L}} = g_{\alpha \beta } \frac{dx^\alpha }{d\lambda }\frac{dx^\beta }{d\lambda }\) is the Lagrangian function, and \(\lambda \) is the affine parameter along the null trajectories [22]. Due to the spherical symmetry of the GSIM, the photon energy E and angular momentum L (along any direction) are conserved along the photon orbit. The photon moves in a single invariant plane [12], characterized by the initial position and spatial velocity vector of the photon. Without loss of generality, we can settle the photon dynamics in the equatorial plane, i.e., \(\theta =\pi /2\). Its orbital equation in a GSIM, derived from the Euler–Lagrange equations, has the following expression

$$\begin{aligned} \left( \frac{\partial r}{\partial \phi } \right) ^2 = -\frac{r^4}{g_{\textrm{rr}}(r) g_{\textrm{tt}}(r)}\left[ \frac{1}{ b^2}+\frac{g_{\textrm{tt}}(r)}{r^2}\right] , \end{aligned}$$
(2)

where \(b =L/E\) is the photon impact parameter, which can be defined as follows

$$\begin{aligned} b = \frac{r \sin (\alpha )}{\sqrt{-g_{\textrm{tt}}(r)}}, \end{aligned}$$
(3)

with \(\alpha \) being the emission angle. The so-called critical impact parameter, \(b_\textrm{c}\), is obtained by Eq. (3) substituting \(r=r_{\textrm{ps}}\) and \(\alpha = \pi /2\), where \(r_{\textrm{ps}}\) is the photon-sphere radius (obtained from the effective potential \(V_{\textrm{Eff}} = -g_{\textrm{tt}}(r)/r^2\) by imposing \(\frac{d V_{\textrm{Eff}}}{dr}=0\)) [13]. We can classify three possible families of null-geodesic trajectories depending on the values of b with respect to the critical photon impact parameter \(b_c\): (1) \(b<b_c\), which include all photons coming from infinity and ending their motion inside the compact object’s boundary; (2) \(b=b_c\), corresponding to the “critical orbits”, where the photons from infinity conclude their motions on a stable circular orbit around the compact body, namely the photon sphere \(r_{\textrm{ps}}\); (3) \(b>b_c\), encompassing all photons coming from infinity, being deflected by the compact object’s curvature, and sent again to infinity. As a final remark, not all GSIM-like metric may allow photons to move along critical orbits.

2.3 Conformally flat spacetime transformation

A CFST [19,20,21] maps the metric (1) into another being isotropic, whose explicit expression is

$$\begin{aligned} ds^2 = -H(\rho )dt^2+J(\rho )({d\rho }^2+{\rho }^2 d\theta ^2 + {\rho } ^2 \sin ^2 \theta d\phi ^2), \end{aligned}$$
(4)

where \(H(\rho )=-g_{\textrm{tt}}(r(\rho ))\), \(J(\rho ) = r(\rho ) ^2/\rho ^2\), and the radial coordinate r changes into a new suitable radial coordinate \(\rho \), whose transformation is

$$\begin{aligned} \rho (r) = C_o \cdot \exp \left( {\int \limits _{r}^\infty \frac{\sqrt{g_{rr}(r')}}{r'} {\textrm{d}}r'}\right) , \end{aligned}$$
(5)

where \(C_o\) is a constant that can be computed knowing that \(J(\rho ) = 1\) for \(r\rightarrow \infty \), for the asymptotically flat condition. As a final remark, this conformal transformation applies only to GSIM space-times.

2.4 Analogous electromagnetic-gravity model

The EM approach for treating the GSIM gravitational fields is based on the analog-gravity model derived in [2]. Since GSIM-like metrics are diagonal in spherical coordinates, the equivalent dielectric permittivity and magnetic permeability tensors are related to the metric tensor via

$$\begin{aligned} \frac{\left( {\overleftrightarrow \epsilon }\right) ^{ij}}{\epsilon _0} = \frac{\left( {\overleftrightarrow \mu }\right) ^{ij}}{\mu _0} = -\frac{\sqrt{-g}}{g_{00}}g^{ij}, \end{aligned}$$
(6)

where \(g=\det (g_{\mu \nu })\). This formalism can be exploited when the EM field amplitudes are low enough such that their effect on the metric tensor is negligible [2]. When the metric is expressed in its isotropic form (4) thanks to the CFST transformation (5), the dielectric permittivity and magnetic permeability tensors assume the following form

$$\begin{aligned} \frac{\left( {\overleftrightarrow \epsilon }\right) ^{ij}}{\epsilon _0} = \frac{\left( {\overleftrightarrow \mu }\right) ^{ij}}{\mu _0} = n (\rho ) ^2\delta _{ij}, \end{aligned}$$
(7)

where \(\delta _{ij}\) is the Kronecker delta and

$$\begin{aligned} n (\rho ) = \sqrt{\frac{J(\rho )}{H(\rho )}}, \end{aligned}$$
(8)

\(n (\rho )\) being the isotropic refractive index, which allows to rewrite the metric (4) as [23]

$$\begin{aligned} {dt}^2 = {n (\rho )}^2 ({d\rho }^2+{\rho }^2 d\theta ^2 + {\rho } ^2 \sin ^2 \theta d\phi ^2). \end{aligned}$$
(9)

Equation (9) represents the EM-length line element for calculating the optical distance between two neighboring points for a Transversal-ElectroMagnetic (TEM) mode of propagation.

2.5 Ray-tracing technique in analogous electromagnetic model spacetimes

We compute the photon geodesics in GSIM-like metrics model by exploiting the conventional ray-tracing scheme via the Snell’s refraction law. In Fig. 1, we report a visual sketch of the strategy adopted in this article.

Fig. 1
figure 1

Scheme of the method employed to discretize a null geodesic path via straight segments and the Snell’s refraction law. The colored circular regions represent a generic GSIM equivalent spacetime described in an isotropic coordinate system through the EM-analog model used in this work. The figure shows how a null geodesic in the inhomogeneous media is approximated by using discrete steps when a photon moves from a region of low refractive index towards a region of high refractive index

Fig. 2
figure 2

Flowchart of the algorithm employed to compute the photon trajectories based on the Snell’s refraction law

In Fig. 2, we sketch the flowchart of the approximation method to calculate photon trajectories in GSIM space-times proposed in this work. Firstly, we set the initial position \((r _{\textrm{i}},\phi _{\textrm{i}})\) and momentum \({\vec {\kappa }}\) of a photon emitted with an emission angle \(\alpha \) in the standard spherical coordinate system or GSIM space-time (see Fig. 2). The momentum, as a function of the initial conditions, is given by

$$\begin{aligned} \left( \kappa _{\textrm{r}}, \kappa _{\phi } \right) = \left( \frac{\cos (\alpha )}{\sqrt{g_{\textrm{rr}}(r_{\textrm{i}})}}, \frac{\sin (\alpha )}{r_{\textrm{i}}}\right) . \end{aligned}$$
(10)

Then, as shown in Fig. 2, we transform the initial conditions in spherical coordinates: the initial position \((r _{\textrm{i}},\ \phi _{\textrm{i}}),\) and the wave vector \(({\vec {\kappa }} = k_r \vec {e}_r+k_\phi \vec {e}_\phi )\) to isotropic coordinates: \((\rho _{\textrm{i}},\phi _{\textrm{i}}),\) and \(({\vec {\kappa }} = k_\rho \vec {e}_\rho +k_\phi \vec {e}_\phi ),\) respectively, by using the Conformally Flat Space-time Transformation. The azimuthal angle \(\phi _i\) and the azimuthal component of the wave vector are not altered, because the coordinate transformation is conformal. Instead, the radial component of the wave vector transforms as

$$\begin{aligned} \kappa _{\rho } = \frac{\partial \rho }{\partial r} \kappa _{\textrm{r}} = \frac{\rho \sqrt{g_{\textrm{rr}}(r)}}{r} \kappa _{\textrm{r}}. \end{aligned}$$
(11)

As shown in Fig. 1, the ray-tracing algorithm can be adapted to any GSIM space-time (9) considering the movement of photons in an inhomogeneous medium and using the Snell’s refraction law, \(n_{{{\textrm{i}}-1}} \sin (\phi ) = n_\mathrm{{i}} \sin (\theta )\), where \(\phi \) and \(\theta \) are the incidence and refraction angles, respectively, and \(n_{{{\textrm{i}}-1}}\) and \(n_\mathrm{{i}}\) are the refractive indices at the point \(i-1\) and i, respectively (see inset in Fig. 1), to compute how the photon’s trajectory is refracted because of the medium inhomogeneity. In the following, we shall explain the main characteristics of the solving-technique based on Snell’s law. Let us consider a photon moving, such as in Fig. 1, from a point \(i-1\) to a point i. We divide the medium into three regions separated by radial distances \(\rho _{i-1}\) and \(\rho _{i}\), respectively, where, for simplicity, we assume that \(\rho _{i}<\rho _{i-1}\) as reported in Fig. 1. We have that \(\rho _{i-1}\) is the initial radial position and \(\rho _{i} = \rho _{i}(\Delta \mu _i)\) is the arrival radial position, where \(\Delta \mu _i\) is the straight-length followed by the photon along its wave vector direction. We state that the refractive index inside the region \(\rho _{i}<\rho <\rho _{i-1}\) is a constant defined by \(n(\rho ) = n(\rho _{i-1})\) since we consider very small displacements. The photon’s movement gives rise to the so-called electrical displacement \((\Delta \mu _{\textrm{ele}}),\) which provides information on the phase difference between two points, obtained by integrating Eq. (9) as follows:

$$\begin{aligned} \Delta \mu _{\textrm{ele}} = \int \limits _{\lambda _{i-1}}^ {\lambda _i} n (\rho (\lambda )) \sqrt{\left( \frac{{\textrm{d}}\rho }{{\textrm{d}}\lambda }\right) ^2+{\rho } ^2 \left( \frac{{\textrm{d}}\phi }{{\textrm{d}}\lambda }\right) ^2} {\textrm{d}}\lambda , \end{aligned}$$
(12)

where \(\lambda \) is an affine parameter along the photon trajectory, useful for the integration process. Equation (12) is a line integral along the aforementioned photon straight-line trajectory. We define \(\Delta \mu _{\textrm{max}}\) as the maximum electrical displacement in order to obtain a good resolution and low approximation error (after having fixed an a-priori tolerance). Between two points, the smaller the electrical displacement is, the smaller the variation of the refractive index will be. This ensures that the solving technique based on Snell’s law provides a reliable approximation. Therefore, at each step, we check whether the electrical displacement is larger than \(\Delta \mu _{\textrm{max}}\), otherwise \(\Delta \mu _i\) (defining the photon’s length-element along the wave vector direction) is reduced until the condition \(\Delta \mu _ {\textrm{ele}} < \Delta \mu _{\textrm{max}}\) is met. After having determined the optimum \(\Delta \mu _i\), we can then compute the arrival radial distance \(\rho _i\) and the related refractive index in that point, \(n(\rho ) = n(\rho _{i})\). We calculate the refracted wave vector to be used in the next photon displacement by invoking the Snell’s refraction law. This process continues until the photon reaches a maximum number of displacements N or when the photon reaches the spatial infinity, namely the limits of the computational domain. The adaptability of the displacement distance \(\Delta \mu _i\) at each propagation step is mandatory provided that the isotropic refractive index, \(n(\rho )\), is non-homogeneous and the optimum \(\Delta \mu _i\) is not known at the beginning of the displacement where it is set to a default value. Once the approximation finishes, the Conformally Flat Space-time Transformation is inverted to come back to the standard (spherical) coordinate system.

This algorithm must be slightly revised for WHs, since the photons can traverse them. Indeed, care must be encompassed during the integration process on the WH throat (boundary between universe 1 and universe 2). In this region, we use as initial position and four-velocity for the universe 2 the arrival coordinates obtained in the universe 1, together with the radial component of four-velocity inverted, while maintaining fixed the angular component. Physically, this corresponds to the angular momentum conservation. To compute the arrival coordinates, we allow the photon to move towards the origin of the universe 1 closer to \(\rho \approx 1.01 \rho _{\textrm{min}}\) (we set this condition heuristically, and it can adjusted in order to improve the precision), which can dub this point the “pre-arrival” point. Then, we compute the arrival coordinates by extending the pre-arrival coordinates to the WH throat by intersecting a straight trajectory along the pre-arrival wave vector with the WH mouth. This approximation may give rise to high deviations when going from one universe to another if the refractive index has strong variation near the WH mouth. This way of approximating null geodesics works very well for all kinds of null geodesic in a GSIM (see Sect. 2.2). However, due to the discrete nature of the algorithm and instability of critical geodesics, particular attention must be used in the calculations of these orbits.

Fig. 3
figure 3

This figure is taken from Ref. [20]

Sketch of image generation of a thin accretion disk around a BH. We define \(r_{\textrm{min}}\equiv r_{\textrm{s}}=2M\) as the Schwarzschild radius, \(r_{{\textrm{i}}}\) and \(r_{\textrm{e}}\) are the inner and outer radii of the accretion disk, respectively. \(d_{\textrm{plate}}\) is the distance between the compact object and the center of the photographic plate, \(\Delta L_p \) is the pixel squared-size, \(r_{\textrm{pixel}}\) is the distance between the pixel center and the origin of the observer’s plate, \(\Phi _{\textrm{ap}}\) is the rotation angle of the invariant plane that passes through the pixel center around the Y axis, and \(\Phi _{\textrm{d}}\) is the rotation angle of the accretion disk around the X axis. The red trajectory is a null geodesic computed in the Schwarzschild metric impinging the accretion disk in a point, which is emitted over there isotropically. \(n_{1}\) and \(n_{2}\) are two refraction indices, \(\phi _{1}\) and \(\phi _{2}\) are the incident and the refraction angles, respectively. \(\hat{n}\) is the normal vector to the circles located in the invariant plane. The computational domain is set in the celestial sphere.

As already mentioned in Sect. 2.2, critical orbits in GSIM-like metric spiral around the WH mouth or BH event horizon stabilizing their motion around the circular photon orbit. In this approach, the photon critical orbits are difficult to be approximated, because they can easily deviate from their trajectories when reach the photon sphere, entailing thus large errors. Therefore, in order to avoid such an effect, we implement an analytical extension to the algorithm, which approximates the final part of the orbit (i.e., when the photons start spiralling around the photon sphere) through a circular trajectory.

2.6 Image generation of compact objects in curved spacetimes

In this section, we show how to produce the image of a compact object described by a GSIM framed in an analogue EM-gravity model. In Fig. 3, we depict the geometrical setup for imaging a thin accretion disk formed around a static and spherically symmetric compact object.

We consider that each element of the accretion disk emits X-ray EM radiation isotropically in its rest frame. Normally, we should compute an infinite number of photon trajectories from all the emission points coming from each geometrical disk element and then find those that reach the observer’s photographic plate located at infinity. We follow instead the inverse procedure, consisting in shooting the photons from the observer’s location towards the emission point . We make use of a collision detection algorithm to know where a light ray is being emitted from. The photon trajectories are colored according to the element they come from.

The photographic plate is divided into squared pixels of lengths \(\Delta L_p \ll r_{\textrm{min}}\), and it is placed at a distance \(d_{\textrm{plate}}\) from the center of the compact object such that the gravitational effects are negligible.Footnote 1 In practice, this corresponds to having \(|g_\mathrm{{rr}}-1|<6\%\) (i.e, asymptotic flatness condition set in our simulations). The protocol for launching the photons relies on shooting them towards the compact body from the center of each pixel with normal direction. Since we are in the invariant plane \((X'-Y'),\) as reported in Fig. 3, we must consider only the initial radius and azimuthal velocity components on the invariant plane under consideration given by

$$\begin{aligned} {\vec {\kappa }} = (\kappa ^r,\kappa ^{\phi }) = \left( -\cos (\phi _{\textrm{i}}),\frac{\sin (\phi _{\textrm{i}})}{r}\right) . \end{aligned}$$
(13)

In order to speed up the integration process we exploit the spherical symmetry of the problem and the fact that photons are launched with a direction perpendicular to the photographic plate. If we look at Fig. 3, we can see the point the photon is being launched from to follow the red-color geodesic high-listed as a blue dot. If we rotate this point on the photographic plate around the Y axis, we will find out that there are at least three more pixels on the photographic plate (high-listed in green), at which photons will be launched with the same initial conditions in the local coordinate system on the corresponding invariant plane \(X', Y'\) (i.e., \(\phi _i, r_\textrm{pixel}\), and \(\alpha _i\)). The geodesics at green points can be obtained from the geodesic at the blue point just by applying a rotation of coordinate system.

3 Results

In Fig. 4, we display the geodesics computed in a space-time generated by a Schwarzschild BH [19, 24] with \(r_s = 2\). Specifically, Fig. 4a shows in an embedding diagram [25] (gray colored mesh) geodesics obtained following the presented approach (colored solid lines) and exact solutions calculated by numerically solving the orbital equation (dashed black lines) for different initial emission angles. In order to measure the convergence of our approach, we plot the angular deviation, \(\Delta \theta \), measuring the absolute angular error between the final ends of the geodesics computed via our method and the exact solutions. For Fig. 4a, it amounts to \(\Delta \theta \le 0.33^{\circ }\).

Fig. 4
figure 4

Simulation results for Schwarzschild BH case: \(r_s = 1\), \(R_i = 5r_s\), \(\phi _i = 45^{\circ }\), and \(\Delta \mu _{{\textrm{max}}}=10^{-2}r_s\). a Geodesics generated for different emission angles \(\alpha \). Color solid lines are results obtained with the proposed algorithm and black dashed lines are obtained via the orbital equation. b Angular deviation versus. emission angle \(\alpha \) inside the range: \(120^{\circ }{-}240^{\circ }\)

Instead in Fig. 4b, we plot the angular deviation when photons are launched in a Schwarzschild BH space-time with emission angles in the range \(120^{\circ }{-}240^{\circ }\). It can be seen that around the critical emission angles \(\alpha _{{\textrm{crit}} 1,2}\) the angular deviation is lower than \(2.3^\circ \), and when the emission angle is outside the range \(\alpha _{{\textrm{crit}} 1,2}\pm 2^{\circ }\), \(\Delta \theta \le 1^{\circ }\). We expected this result due to the discrete nature of the algorithm and the instability of the critical orbits and trajectories for photons emitted with impact parameter near to the critical impact parameter, \(b_c\). This behavior can be improved by increasing the discretization density. As it can be noted from Fig. 4a, photons with emission angles larger than the critical one do not fall into the BH, whereas, for critical orbits (cyan solid line), photons are trapped on the photon sphere region. In Fig. 4a, for critical orbits, the numerical approximation is analytically extended using a circular trajectory as explained in Sect. 2.5, and photons with emission angles lower than the critical one fall into the BH event horizon.

Fig. 5
figure 5

Simulation results for an Ellis WH: \(b_0 = 1\), \(R_i = 5r_s\), \(\phi _i = 45^{\circ }\), and \(\Delta \mu _{\textrm{max}}=10^{-2}b_0\). Panel a: Geodesics generated for different emission angles \(\alpha \). Solid color are results obtained with the proposed algorithm and black dashed lines are results obtained from the orbital equation. Panel b: Angular deviation versus emission angle \(\alpha \) inside the range: \(120^{\circ }{-}240^{\circ }\)

Now we focus our attention on geodesics computed in the Ellis WH space-time [25] setting the units for the WH throat as \(b_0 = 1\), see Fig. 5. In particular, Fig. 5a shows in the embedding diagram (gray grid) the geodesics computed with our approach (solid lines) and the exact solutions (black dashed lines), having \(\Delta \theta \le 0.63^{\circ }\) in this case. Instead in Fig. 5b, we report the angular discrepancy distribution for the emission angle in the range \(120^{\circ }{-}240^{\circ }\). In this case, the maximum \(\Delta \theta \) is located around \(\alpha _1 = 170^{\circ }\) and \(\alpha _2 = 190^{\circ }\) with \(\Delta \theta \approx 3^\circ \). Outside the range \(\alpha _{1,2}\pm 2^{\circ }\), \(\Delta \theta \le 1^{\circ }\). As shown in Fig. 5a, photons emitted with an emission angle larger than the critical one propagates in the same region (universe 1), whereas photons with emission angle shorter than the critical one go through the WH mouth into the so-called universe 2. The photon sphere of the Ellis WH coincides exactly with the WH mouth. Photons emitted with a critical emission angle (cyan solid line) are trapped in the photon-sphere.

Fig. 6
figure 6

Simulation results for WH framed in the metric theory of gravity: \((b_0,\gamma ) = (0.5,1.5)\), \(R_i = 5r_s\), \(\phi _i = 45^{\circ }\), and \(\Delta \mu _{{\textrm{max}}}=10^{-2}b_0\). Panel a: Geodesics generated for different emission angles \(\alpha \). Solid color are results obtained with the proposed algorithm and black dashed lines are results obtained from the orbital equation. Panel b: Angular deviation versus emission angle \(\alpha \) inside the range: \(120^{\circ }{-}240^{\circ }\)

We then consider a Morris and Thorne-like WH solution framed in a metric theory of gravity (see Ref. [13] and references therein for more details) endowed with \((b_0,\gamma ) = (0.5,1.5)\), see Fig. 6. As done for the previous cases and adopting the same color and style conventions, we first show the geodesics obtained via our method and those obtained integrating exactly the orbital equation using \(\Delta \theta \le 12.8^{\circ }\) (see Fig. 6a). Then, we highlight the angular discrepancy profile for emission angles in the range \(120^{\circ }{-}240^{\circ }\) (see Fig. 6b). In the last case, the maximum \(\Delta \theta \) is located around \(\alpha _1 = 144^{\circ }\) and \(\alpha _2 = 216^{\circ }\) with maximum deviation of \(\Delta \theta \approx 308.51 ^{\circ }\). Outside the range \(\alpha _{1,2}\pm 12^{\circ }\), \(\Delta \theta \le 4^{\circ }\). We note that in this situation, the angular deviation is considerably larger than the previous cases. This anomaly is related to the fact that the WH metric admits a singular point near the WH mouth and there the refractive index blows up.

Finally, we compare the numerical simulation of an accretion disk around a BH provided by Bogush et al. [26] (see Fig. 7a) with the one produced employing our approach (see Fig. 7b). The colors of the accretion disk in Fig. 7b refer to the observed bolometric flux, as implemented in [8, 27]. This numerical simulation shows the characteristic gravitational redshift effects, where matter moving away from the observer is redshifted, whereas that approaching the observer is blueshifted. In addition, the BH shadow (black circular spot surrounded by the BH accretion disk), as seen from infinity, agrees with the theoretical prediction (red dashed circle with radius \(r_\mathrm{{sh}} = {3 \sqrt{3} r_\mathrm{{s}}}/{2}\)) as reported in [28]. In Fig. 8, we concentrate on the apparent image of an Ellis WH with \(b_0=5\) as seen from the universe 1, where the observer is located. We can see, outside the WH mouth (white dashed circle) how the space-time is distorted because of gravity, whereas inside the mouth, a view of the universe 2 appears.

Fig. 7
figure 7

Apparent image of a Schwarzschild BH surrounded by a thin accretion disk. We set the BH mass \(M=1\), \(r_s = 2\), \(r_{\textrm{skyph}} = 60 r_s\) (computational domain limit or infinite), \(\Delta L_{p} = r_s/10\), \(d_{\textrm{plate}} = 40 r_s\), \(r_i = 3r_s\) (internal radius of the accretion disk), \(r_e = 15 r_s\) (external radius of the accretion disk), and \(\theta _{\textrm{o}} = 80^\circ \) (inclination angle of the observer). The red and white dashed circles represent the photon sphere radius projected at infinity (BH shadow), and the BH event horizon \(r_s\), respectively. The lateral colored scale represents the normalized time averaged energy flux of matter present in the accretion disk. Panel a: Apparent numerical image of a Schwarzschild BH provided by Igor Bogush [26], where \(\Sigma \) is a coupled scalar field. The vertical and horizontal axes: \(\beta \), and \(\alpha \), represent the projection of the BH image on the observer’s sky. Panel b: Result obtained with our approach. Credits for textures used in this image to [29]

Fig. 8
figure 8

Apparent image of a Morris and Thorne-like WH in metric theory of gravity [13]. We set \(b_0 = 5\), \(r_{\textrm{skyph}} = 8 b_0\) (computational domain limit or infinite), \(\Delta L_{p} = b_0/50\), and \(d_{\textrm{plate}} = 4 b_0\). The white dashed circle represents the WH mouth size \(b_0\). Credits for textures used in this image to [29]

4 Conclusion

The null geodesic trajectories, calculated by exploiting the proposed algorithm shown in Figs. 4, 5, and 6, exhibit an excellent agreement with the exact solutions obtained by solving the orbital equation (2). The main and only limitation of our approach is related to critical and quasi-critical geodesics due to the instability of the photon trajectories owed to the discrete nature of our algorithm. We obtained an angular deviation lower than \(3^\circ \) for both, the Schwarzschild BH and the Ellis WH under the simulation conditions of this work (see Figs. 4 and 5). For the WH framed in the metric theory of gravity, we obtained considerably larger errors for quasi-critical geodesics. In general, for geodesics with \(b>b_c\), the exact and approximated solutions exhibited a reasonable agreement by presenting low angular deviations. This implies that the algorithm may be exploited for the study of emission lines from accretion disks. The accuracy can be improved by either increasing the resolution of the geodesics (but this naturally entails also as a consequence an increment of the computational times) or by implementing alternative strategies for estimating the displacement \(\Delta \mu _i\) at every step. For photons falling toward a BH singularity, the approximation of the intersection between the geodesics and the BH event horizon is not critical; instead for photons traversing a WH mouth, the way in which the intersection point between the photon orbit and the WH mouth in the universe 1 is computed might give rise to strong deviations in the final ends of the geodesic segment in the universe 2. The isotropic refractive index attains higher values around the WH mouth, therefore there more precision in the calculations should be employed in order to avoid these problematic issues.

The use of isotropic coordinates is extremely important not only for calculation purposes, but they are also able to intuitively capture the main properties of curved space-times. In addition, this algorithm can be straightforwardly generalized to non-zero EM wavelength cases by taking into account the diffraction effects through full-wave numerical solvers based for example on the Finite Element Method (FEM) [30] or the Finite-Difference Time-Domain (FDTD) method [31].

This algorithm can be applied in the numerical image generation of compact objects such as BHs, neutron stars, and WHs. The results presented in this work are very promising if compared with other established and accepted numerical simulations reported in the literature. The advantages and future potentiality of this approach can be shortly summarized in the following points: (1) investigating gravity and gravitational effects through a model easily buildable in laboratory in order to project tests of gravity in small scales, as well as to simulate also and probe gravitational effects occurring around compact objects; (2) vice versa, gravity can be of inspiration for developing new EM technologies, which can be widely employed for engineering applications and to improve the everyday life of the society.