# Is there a working law of gravity in 2D?

I am constructing a two dimensional world, but ran into a problem with one of the fundamental forces, gravity.

I first tried to see what would happen if I just used the normal law of gravity, $\frac{m_1m_2}{r^2}$. As it turns out, it has a problem:

Consider a person standing on an edge of a "planet" in 2D. then, the area coloured green has an influence on you (I have made things with area have mass, in order for the concept to work in my 2D world.): Now, consider another area with the same shape inside that one: It has just $\frac{1}{2}$ the distance, thereby four times the gravity. But it also has just $\frac{1}{4}$ of the area, and therefore a total gravitational influence similar to the green area. I can continue to stack those areas, with a sum of 1+1+1+1... Every edge then becomes a black hole!

The same argument does not hold for 3D, as half-shells have an influence of $1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}...$ which does not reach infinity. (You can obtain that result yourself by noticing that your skin is not made up of black holes).

Obviously, I must then choose another exponent for $r$, and that can not be 2 or larger, because of the half-circle argument, and it can not be 0 or lower, as that would make the whole universe collapse into a black hole.

Also, I want orbits to be periodic, to make planet systems stable. I know $exp=1$ does not have periodic orbits other than in special cases, but there must be other possibilities than $exp=2$, as the case $exp=-1$ is periodic.

Is there a solution with periodic orbits for $0<exp<2$?

• Note that the inverse square law only works for 3 spatial dimensions. To obtain the correct law for 2 spatial dimensions, solve the Poisson equation $\Delta\phi=\phi_{xx}+\phi_{yy}=4\pi G\rho$. – Ryan Unger Mar 3 '16 at 14:24
• And in case you're not tired of comments yet: I found our version of this question on Physics. – David Z Mar 3 '16 at 14:47
• Comments are not for extended discussion; this conversation has been moved to chat. – Serban Tanasa Mar 4 '16 at 19:27
• Off the top of my head, I think the problem is the 2d definition of mass as proportional to area, instead of volume. That makes mass, hence force, not decrease fast enough for smaller objects. You might be able to add a power factor, raising each mass to the 3/2 before you multiply them. I've done a similar 2d simulation of gravity that worked fine, but it wasn't really a 2d world; it was a 2d slice of a fully 3d world, so the math worked out. – kbelder Mar 4 '16 at 20:16
• @kbelder I suggest bringing that to the chat room – David Z Mar 5 '16 at 12:35

Unfortunately, those are the special cases. This was actually proven as Bertrand's Law which states that there are exactly two central force potentials (forces which only depend on radial distance) which can generate stable orbits. The first is the inverse-square law, which we are familiar with. The second is the radial harmonic oscillator (a oscillator operating purely in a radial direction). As you suspected, other forces can generate a closed orbit, but they are not stable. If you perturb them in the radial direction, they collapse. Bertrand's Law formulates the motion of particles in their Lagrangian form (path invariant), and then does a perturbation analysis. His law shows that the only possible forces which could lead to stable orbits are power law forces (F=r^d), and then goes to demonstrate that only 2 values for d actually result in stable orbits. One leads to the inverse square law, and the other leads to a radial harmonic oscilator.

Thanks to David Z for finding the link to the Physics.SE question which pointed me to Bertrand's law.

As an addendum, apparently one can show that there are stable orbits in 2d using inverse square laws for the forces, but they are not closed, meaning they do not arrive back at their original location. (the word "orbit" has a very precise definition in dynamics that isn't quite consistent with the layman's meaning of the term, which typically implies a closed stable orbit)

• I have run simulations on 2d gravity and found that it does produce stable orbits which are flower shaped but they do not return to the same position or velocity although the orbits do repeat the distance and speed in less than one orbit. The idea that Bertrand's law proves that stable orbits are only possible using two force potentials is based on the assumption that in order for an orbit to be stable it must be closed but to be stable an orbit only needs to repeat the distance and speed and not the position and velocity. The inverse cube law really does not produce stable orbits though. – Anders Gustafson Mar 3 '16 at 20:56
• @Anders this feels like it should be an answer in its own right. – hiergiltdiestfu Mar 4 '16 at 8:13

This is a fascinating question.

Newton's Law of Universal Gravitation was derived empirically, and as far as I know, nobody knows why it is the way it is or how it works. We've done experiments to determine its precision, and things like the exponent of 2 in the denominator are so precise that the idea that there's no reason that it's related to 3D geometry seems absurd to me, but this doesn't necessarily make it so.

However, physicists have drawn a parallel between electric force and gravitational force for a long time, because first of all they intuitively feel similar (both deal with objects in space exerting force on each other) and their basic formulas are similar.

$$F_g = -G\frac{m1m2}{r^2}$$

$$F_e = -\frac{1}{4\pi\epsilon_0}\frac{q_1q_2}{r^2}$$

So it's long been thought that their function is similar in nature.

Now, if we rearrange some of the terms in the electric force formula, we'll see something very interesting.

$$F_e = -\frac{1}{4\pi r^2}\frac{q_1q_2}{\epsilon_0}$$ $$F_e = -\frac{1}{A}\frac{q_1q_2}{\epsilon_0}$$

The equation actually contains the formula for the surface area of the sphere having one of the two charges at its center and the other on its surface.

So the following is entirely speculative, but hopefully scifi readers would be satisfied with it.

Assuming that gravity works the same way, the proper formula for a 2D world then would include the circumference of the circle with one mass at its center and the other on its circumference. So we need to alter Newton's formula by multiplying surface area out and dividing circumference in in its place.

$$F_{g_{2D}} = -G\frac{m_1m_2}{r^2} * 4\pi r^2 / 2\pi r$$

The $\pi$'s cancel, and the r's recude to a power of -1, so this becomes:

$$F_{g_{2D}} = -2G\frac{m_1m_2}{r}$$

As far as orbit, keeping in mind this whole thing is purely speculative, this should be achieved when centripetal acceleration is equal to gravitational acceleration...

$$a_{g_{2D}} = a_c$$ $$-2G\frac{m}{r} = -\frac{v^2}{r}$$ $$-2Gm = -v^2$$ $$2Gm = v^2$$

Which happens whenever v is exactly right, regardless of the radius of orbit.

It's good enough for sci-fi readers, I bet.

• This will not produce stable periodic orbits, though. – HDE 226868 Mar 3 '16 at 16:35
• Hm... the part that you identified as "entirely speculative" is kind of common knowledge in physics, so that may be a bit of a mischaracterization. – David Z Mar 3 '16 at 16:58
• @HDE226868 No, and there are other concerns too. For example, density would now have to be mass/area instead of mass/volume, which throws a wrench into fluid dynamics, which throws off anatomy, which throws off psychology, which throws off economics... – Devsman Mar 3 '16 at 17:31
• @devsman so, how do you make sure the tube doesn't fall apart into a pair of tube walls while still allowing the intended content to pass through the tube? – John Dvorak Mar 3 '16 at 18:56
• @JanDvorak Ah, for tubes open on both ends, it seems this would be true. But you can still have 2D tubes that end at a closed area on at least one end. This is actually another problem with fluid dynamics, come to think of it. – Devsman Mar 3 '16 at 21:18

The formula for gravity is basically the same as gauss's law for gravity divided by the formula for the surface area of a sphere multiplied by the second mass. The surface area of a sphere is given by the formula $$SA=4\pi\ r^2$$ in which SA is the surface area, and r is the radius. Gauss's law for gravity is given by the formula $$∇ · g=-4\pi\ GM$$ in which ∇g is the gravitational flux, G is the Gravitational Constant, and M is the mass. The $$-4\pi\$$ is in the equation so that the equation for the force of gravity does not have 4π at the bottom.

In both 3d and 2d the gravitational flux is independent of distance so in 2d the force of gravity would have a different relationship to the distance between two objects. This means that the units for the gravitational constant are different in 2d so we can use the symbol $$G_{2d}$$ to represent the gravitational constant for 2d. If we want to avoid having $$2\pi\$$ in the numerator of the equation for gravity in 2d we need to use the equation $$∇ · g_{2d}=-2\pi\ G_{2d}M$$ for the gravitational flux in 2d. If we divide the 2d gravitational flux by the equation for the circumference of a circle, which is $$C=2\pi\ r$$, with C being the circumference and r being the radius and multiplied by the second mass we get $$F_{2dg}=-\frac{2\pi\ G_{2d}M}{2\pi\ r}$$ which simplifies to $$F_{2dg}=-\frac{G_{2d}Mm}{r}$$ for 2d gravity with $$F_{2dg}$$ being the force of gravity in 2d and m being the second mass. So in 2d the exponent the r in the denominator is raised to is one.

If you want to know what orbits this equation produces I can tell you that I have run simulations using this equation and it produces flower shaped orbits.

As a constructive suggestion, you could make the force $1/r^2$ at long distances but have a short-range correction term that makes it fall off to $1/r$ at short distances. This isn't beyond the bounds of what's reasonable for a physical force.

One way to motivate this is to imagine that your 2D world is actually 3D after all, it's just that everything in it happens to be a flat shape lying in the same plane, and all objects are exactly one inch thick in the third dimension. Then if you're more than a few inches away from something the forces will behave just as you describe, but when things get closer than that they will attract each other like normal 3D objects and you won't get the divergent sum. This kind of idea could probably be couched in terms of "rolled up" dimensions a la string theory, if you felt so inclined.

If you have a minimum distance between objects (caused by some kind of small-scale repulsive force), the sum is finite (this is why we don't have infinite gravity from standing "on" the ground in 3D) Although it might still go to black hole levels if you add much mass at all with molecular-sized minimum distances.

• It can be something like $G\left(\frac{m_1m_2}{r^2}-\frac{m_1m_2}{r^3}\right)$ – Hohmannfan Mar 4 '16 at 8:17
• Or why wires placed next to walls don't collapse into them, which is mathematically identical to the case in the OP (for an infinite wire on an infinite wall). – Pete Kirkham Mar 4 '16 at 10:22

It is well known that orbits are not periodic in a 2D universe. See the book Plainiverse by A.K. Dewdney it includes details of physics including a space station! Anyone interested in 2D worlds should read this.

The natural fall-off is exactly the spreading out factor of a force, or the ratio of the surface to the interior. So you don't get infinite cascades.

You can arrange for spirograph orbits that work well enough: the kenetic energy vs potential energy tradeoff still works, so you get an orbit-like thing with the same bounds of a peri- and apogee. It just doesn't repeat in-place on each orbit.

It seems to me that there is an error in your calculations of same gravity effect of concentric rings. Here I have added a grid to your picture: The area of the green ring is $A = 0.5 \cdot (\pi \cdot 4^2 - \pi \cdot 2^2) = 6 \pi$ and gravity $G = \frac {\rho A}{3^2} = \frac{2}{3}\rho \pi$. For red ring, I get gravity of $G = \frac {0.5 \cdot \rho \pi (2^2 - 1^2)}{1.5^2} = \frac{2}{3}\rho\pi$. This is the same argument as in the original question.

However, it seems to be more a rounding error, due to the way how more of the mass of the green ring is actually more distant from the center. If it is instead divided to two rings: Then the total gravity by the green parts is: $G = \frac {0.5 \cdot \rho \pi (4^2 - 3^2)}{3.5^2} + \frac {0.5 \cdot \rho \pi (3^2 - 2^2)}{2.5^2} = \frac{24}{35}\rho\pi$ which is slightly more than the previous $\frac{2}{3}$. Not very conclusive.

Forming the actual integral, I get as the gravity in center:

$$\int_0^R \frac{2\rho\pi r}{r^2}dr = 2 \rho \pi \int_0^R \frac{1}{r} dr = 2 \rho \pi \cdot (\mathrm{ln}\,R - 1)$$

And thus there would be no more problem than in the 3D case of very thin, very dense disc. But of course it is possible that I have made error in my calculations and your original ones were correct..

• My diagram was eyeballed, but each area is intended to cover half the remaining distance towards the centre. You have made them 2/5 and 1/3 for unknown reasons – Hohmannfan Mar 4 '16 at 7:21
• @Hohmannfan Hmm yeah, I see your point now. I updated the pictures, but the answer is not very conclusive now. Hopefully this will give someone else some ideas.. But to me it seems there should be the same problem with a thin disc in 3D world then. – jpa Mar 4 '16 at 8:00
• Nope, in 3D, if you have a constant thickness (e.g. not scale it), then that distance sooner becomes the dominant term. And with 0 thickness, the disk does not have mass in 3D, thus the problem does not exist. – Hohmannfan Mar 4 '16 at 8:12
• @Hohmannfan Hmm, true. Though there is always a lower limit on distance, namely the distance of atoms. Otherwise there would indeed be a mini-blackhole if you had even just two atoms at inifinitesimal distance to each other. – jpa Mar 4 '16 at 8:46
• @jpa You'd only have a mini-blackhole if your atoms were point masses, which they aren't. An atom, even a nucleus, has a radius, and two touching (or even superimposed) atoms wouldn't pack their mass into a small enough radius to form a black hole. – ckersch Mar 7 '16 at 19:23

I've been working on a 2d-simulation game for well over 5 years, complete with walking, interactive, balancing bipeds in $10 m/sec^2$ accel gravity at about human scales. For your question about the stable orbits, flux would have us believe it's 1/R, as described in Dewdney's Planiverse. But if you are making this as a a game for entertainment, You could take artistic license (or come up with some string theory :) to back it, and make up a gravity law. But more importantly , other things also go along with the 1/R flux dispersion, such as sound intensity. I used 1 / squared for that. Because I don't want to walk 1 km to get away from a sound. Same with, wind drag. Same reason, or stuff even in water will never stop and it's hard to paddle your boats or swim. 2d atoms are different and you don't have to assume the Planiverse model is stepped down from our theory, much of which is made to fit what we observe. I make changes for the sake of immersion, I trust the Box2d engine, and , when you have a small monitor, even if it camera-tracks, you want dramatic motion on it. Bombs, I do $1/R^2$

so it doesn't blow over everything .. but, the Shrapnel is 1/R. You are going to get injured and so are the others.

but hey, funny coincidence, but so happens I invented a fuel pipe just today. Devsman mentioned the transport tubes. Liquid fuelled rockets, very helpful, especially if there is no escape velocity in the 1/R gravity. Dewdney and team got some things wrong, because he didn't have a 2DWORLD simulator. As for life in 2d, well, life "finds a way" -from jurassic Park.

The zipper organs are great in biology , ( i like to invent the 2D devices but i don't think most kids who play the game even appreciate it.. they just want to blow the Ardean's heads off. I think, it, it will not leak, can be strong and or flexible ( there is no buckling in 2d) and will allow a compressed gas through, that looks like this.. Can be used with gimballed or v2-like rockets with vanes. The right side drawing has some stress pulling apart the tube, so the liquid needs high pressure then if its going to the rockets combustion chamber. In the case of gravity and other dispersive flux , I used $1/R^2$, because, well , its possible that stuff loses energy , say there is friction , dark matter, curved spaces. Funny it seems the string theorists are finding the 2+1 equations the only thing they can solve for quantum gravity, GUT, string theory ..white holes, etc...( all those holographic principle reports, i tried to read the papers but i'm clueless and I don't think many, or any people are too sure about gravity theory, in the world we can observe.

Feel free to contact me if you want to share ideas about the simulation.

[ ][]

[ ][]

• for the tubes, each spiral is connected to a pipe wall – Damian M Hallbauer Mar 5 '16 at 15:01

How about some Occam's razor?

I've have just started reading a book called "Pushing gravity" which goes back to the theories and ideas of Le Sage, which Newton himself liked.

Le Sage suggested that minute particles travel in all directions at very high speeds and when they impact matter they cause 2 bodies A and B to accelerate towards each other because A shadows some of the rain of particles (or waves/aether/whatever) travelling from A to B (and vice-versa), resulting in a net total push of B towards A (and vice-versa).

The inverse square law of distance is then easily explainable: If a square that covers $10m*10m = 100m^2$ of the sky moves to twice the distance it will then only cover an area of $5m*5m = 25m^2$. The shadow is $1/4$ smaller so $1/4$ of the push (gravity).

Area is in this sense meant by the sum of individual atoms/electrons, i.e. mass.

So for your 2d world, if an object halves the distance, its new "shadow area" will be 2x, not 4x like in 3d. Does that work for you?

$$F = G(r) \frac{m_1 m_2}{r^{1.6}}$$