# Embedded Graphics: General Relativity

Is there a way to make the following graph with two dimples? Like the central indent and another indent to the side to simulate a central mass like the sun and another smaller mass like the Earth in the same plot.

Code:

RevolutionPlot3D[-1/z, {z, 0, 4}, Boxed -> False, Axes -> False,
Ticks -> None, PlotStyle -> Opacity[.1], ImageSize -> {300, 350}]


Note that this code came from Wolfram Demonstrations of an embedded Schwarzschild diagram. Any suggestions would be greatly appreciated.

Stephen

You just need to insert the correct potential, (and change plot function since we lose azimuthal symmetry). For example, we can create a smaller dimple at the position (2,2)

Plot3D[-1/Sqrt[(x^2 + y^2)] - .1/Sqrt[((x - 2)^2 + (y - 2)^2)], {x, -4, 4}, {y, -4, 4},
Boxed -> False, Axes -> False, Ticks -> None,
PlotStyle -> Opacity[.1], ImageSize -> {300, 350}, Mesh -> 20]


EDIT

In this answer I used the potential $1/r$ that appears in the question. Of course this potential is singular in the origin and can't be used for objects with a finite mass such as the Earth or the Sun. It is however easy to replace the potential above with a more realistic one. Moreover, a $1/r$ is a good approximation at distances larger than the radius of the object.

• Good idea but your function is singular at the two centers of the holes. The user wants to plot the curvature due to the mass of the Sun and that of the Earth, but surely these two stellar objects do not act like black holes thus creating infinite deep holes! Jan 6, 2015 at 13:28
• @Vaggelis_Z very true indeed. I simply used the potential in the question (which is singular). Of course the OP can use the potential that best suits his/her needs! Jan 6, 2015 at 18:19
ParametricPlot3D[ {x, y, -1/Norm[{x + 1, y}] - 1/Norm[{x - 1, y}]},
{x, -4, 4}, {y, -4, 4},
PlotRange -> {{-4, 4}, {-4, 4}, {-5, Automatic}}, Mesh -> 20,
Axes -> False, Ticks -> None, PlotStyle -> Opacity[.1]]