# Is this solveable? Simultaneous elastic collision of 4 objects in XY plane

I'm writing a computer program/game and can't figure something out; I want to be able to calculate the resulting velocities of 4 particles (hexagons, specifically) after they simultaneously (elastically) collide, given their initial velocities. They all have the same size and mass, and in the specific case I'm trying to solve currently, one hexagon is fired at three stationary hexagons (as shown below).

I've seen many many problems on here and other sites dealing with the collision of 2 or 3 objects simultaneously, but none dealing with 4. Is it solvable? I've tried to solve it through looking at the forces, as well as through conservation of momentum/energy, but I can only ever get 3 equations, and there are 4 unknowns. Am I missing something?

I read something suggesting that many simultaneous collisions could be simplified by pretending they weren't actually simultaneous, and I'm looking into that, but I would like to better understand how this stated problem can be solved, or why it can't be solved if that ends up being the case.

Edit: I just wanted to update that this can't be simplified by pretending it isn't simultaneous,

Edit after being answered: In case anyone else is trying to do something similar, two solutions were given, the accepted answer solves the general case, while another answer below solves the specific case I asked about.

• If it is ideal then it is solvable, unless there is also rotations involved which makes it so much more complicated because it is not going to be in contact with all the bodies at the same time. Apr 3, 2015 at 16:44
• It's defined to be exactly ideal, with no rotations; all forces are assumed to act directly towards the center of mass of each hexagon. Also location is essentially quantized, so when the A hexagon moves, it will instantly be one hexagon-width to the right, and then again. At the moment of the second move, the collision happens; So all the collisions happen simultaneously. Apr 3, 2015 at 18:21
• The collisions are all also defined to occur over the same period of time. Apr 8, 2015 at 3:17
• To say that the collisions are all defined to occur over the same period of time can be problematic. Here you have a case where an infinitesimal difference in the interation can cause a significant difference in the final outcome, and that in a sense renders a numerical simulation meaningless since the solution is not numerical stable to extremely small noises. Apr 12, 2015 at 6:04

The problem is equivalent to 4 spheres colliding simultaneously, where top sphere center is at $60^o$ relative to the $x'x$ axes (same goes for bottom sphere):

We'll name them: sphere A (dark blue), and spheres 1, 2, and 3.

During the collision the spheres will behave like springs with an infinite hook constant. The forces on the spheres will be infinite and the duration of interaction will be 0.

The red area is where the spheres are compressed during the collision. If sphere 2 is compressed by $l$, and spheres 1 and 3 by $d$, then $\frac{d}{l}=sin30^o$ (trigonometry involved but i couldn't draw it here) and finally $l=2d$.

The energy stored in each spring is given by the formula $U=\frac{1}{2}kx^2$, and it will be converted to kinetic energy. Therefor, $K_1=K_3=\frac{1}{4}K_2$ and $v_1=v_3=\frac{1}{2}v_2$.

Before the collision sphere A has velocity $v_A$ and after the collision, $v_B$.

Conservation of energy:
$K_A = \frac{1}{2}mv_A^2 = \frac{1}{2}m(v_B^2+v_1^2+v_2^2+v_3^2)$, that is $v_A^2=v_B^2+v_1^2+v_2^2+v_3^2=v_B^2+\frac{3}{2}v_2^2$ (1)

Conservation of momentum:
$mv_A=mv_B+mv_1+mv_2+mv_3$, that is, $v_A=v_B+v_{1x}+v_2+v_{3x}$

Momentum on y axes is 0, since $v_{1y}=v_{3y}$. Also, $v_1$ forms a $60^o$ angle, so $v_{1x}=\frac{1}{2}v_1=\frac{1}{4}v_2$ and

$v_B=v_A-\frac{3}{2}v_2$ (2)

Finally:
Using (1) and (2) we get a single solution $v_2=0.8v_A$. The other velocities can be easily calculated, since we have found $v_2$.

• That's perfect! The math seems correct, I'll check back once I've derived it myself. I guess I assumed for some reason that I couldn't treat them as springs, thinking that'd mean I'd have to also find the forces involved. It never came to mind that I could solve it using the spring energy. I'll mark it as correct, because even if your math is wrong somewhere I'm fairly sure that's an accurate way of solving it. Apr 14, 2015 at 16:08
• I got also $\frac{4}{5} v_A$ for an elastic collision which means the math is probably correct, yet with the impulse method I described you can make the collision inelastic or plastic and also account for different initial conditions. Apr 14, 2015 at 16:26
• @ja72 My solution might not be the best; I m not very experienced with collisions. I saw it mostly as a challenge and tried to solve it. I m glad we got the same result, no need for anyone to review our solutions.
– user
Apr 14, 2015 at 16:39
• @user5061 if instead of using springs you use some other force, such as an inverse repulsive square law (coulomb), you will obtain a different result. So this solutions is a functions of the format of the interaction force
– user66432
Apr 15, 2015 at 5:09
• @brucesmitherson Trying to solve it the way you describe is quite interesting. However i think it is not identical to the solution i presented, because the interaction (collision) doesn't have the characteristics i assumed with the springs. Namely: collision duration is not nearly 0, forces are not infinite and they don't act "locally". You might be able to solve it though if you assume something witty, e.g. force being proportional to $r^{-c}$, c being a huge (nearly infinite) number, and proportional to a huge constant k. (it's a guess, i might be wrong)
– user
Apr 15, 2015 at 11:45

Here is how you deal this this problem as a system of equations. For each contact pair assign a normal direction $\hat{n}_k$ and and impulse $J_k$. The possible contacts are AB, AC, and AD. We can introduce symmetries and simplifications later.

The initial velocity if body A is $v_A$ along the horizontal axis, and after the collision it is $v_A + \Delta v_A$. From the change in momentum you can work out

$$m \Delta v_A = -J_{AB} \frac{1}{2} -J_{AC} - J_{AD} \frac{1}{2}$$

where the factors of 1/2 come from $\cos 60°$. This is simplification of the general equation $$m_i \Delta \vec{v}_i = \sum_k \hat{n}_k J_k$$ when projected along the x-axis.

Now we look at the momentum change of body C along the horizontal axis also

$$m \Delta v_C = J_{AC}$$ and the momentum change for the rest of the bodies is measured along the contact normals (60° from horizontal) as $$m \Delta v_B = J_{AB} \\ m \Delta v_D = J_{AD}$$.

For fun I am including the possibility of inelastic collision with $\epsilon$ the coefficient of restitution. The collision rules are expressed along the contact normals where the final relative speed is a negative fraction of the impact relative speed

\begin{align} \frac{1}{2}(v_A+\Delta v_A)-(v_B+\Delta v_B) & = -\epsilon (\frac{1}{2}v_A-v_B) \\ (v_A+\Delta v_A)-(v_C+\Delta v_C) & = -\epsilon (v_A-v_C) \\ \frac{1}{2}(v_A+\Delta v_A)-(v_D+\Delta v_D) & = -\epsilon (\frac{1}{2}v_A-v_D) \end{align}

In the above three equations the changes of speed as substituted from the momentum equations such as \begin{align} \Delta v_A &= (-J_{AB} \frac{1}{2} -J_{AC} - J_{AD} \frac{1}{2})/m \\ \Delta v_B &= J_{AB}/m \\ \Delta v_C &= J_{AC}/m \\ \Delta v_D &= J_{AD}/m \end{align}

The above becomes a 3×3 system of equations for the impulses

$$\frac{1}{m} \begin{bmatrix} -\frac{5}{4} & -\frac{1}{2} & -\frac{1}{4} \\ -\frac{1}{2} & -2 & -\frac{1}{2} \\ -\frac{1}{4} & -\frac{1}{2} & \frac{-5}{4} \end{bmatrix} \begin{pmatrix} J_{AB} \\ J_{AC} \\ J_{AD} \end{pmatrix} = -(\epsilon+1) \begin{pmatrix} \frac{1}{2}v_A-v_B \\ v_A-v_C \\ \frac{1}{2} v_A - v_D \end{pmatrix}$$

When B, C and D are at rest initially the above is solved for

\begin{align} J_{AB} &= (\epsilon+1) \frac{m v_A}{5} \\ J_{AC} & = (\epsilon+1) \frac{2 m v_A}{5} \\ J_{AD} &= (\epsilon+1) \frac{m v_A}{5} \end{align}

Now the final velocities are found by \begin{align} v_A+\Delta v_A & = \frac{v_A (2-3\epsilon)}{5}\\ v_B+\Delta v_B &= \frac{v_A (\epsilon+1)}{5} \\ v_C+\Delta v_C &= \frac{2 v_A (\epsilon+1)}{5} \\ v_D+\Delta v_D &= \frac{v_A (\epsilon+1)}{5} \end{align}

For an elastic collision ($\epsilon=1$) the final speed of B is $v_B+\Delta v_B = 0.8 v_A$.

NOTE: Solution of n-body collision https://physics.stackexchange.com/a/91069/392

• That's also perfect.. the other person answered before you and answered my question specifically, but you answered more the general case, which I'm going to need. I want to eventually have this be 3D and be able to work even if all the particles are moving, and it'd be great if I could add in inelastic collisions. I already selected his though, so I think all I can say is sorry and thank you very much for this :) Unless there's some standard method of dealing with multiple good answers that I'm not aware of. Apr 14, 2015 at 16:27
• For 3D use physics.stackexchange.com/a/92132/392 Apr 14, 2015 at 16:30
• @nogrodoth There is an implicit assumption that the ratio of speed change for these objects remains the same throughout the course of collision. This also implies that the contact with all 3 objects starts exactly the same time, and lasts exactly the same duration. This of course can't be achieved in a real system, but will have to be assumed to work out the outcome. Just be advised that the outcome is not stable to your initial condition, that is, even you move one block an almost infinitely small amount, the outcome will be completely different. Apr 14, 2015 at 21:42
• I had the same concerns but the OP stated in comments that this is really more like a game and not a simulation. The positions are quantized (snapped) to a hex grid so the collision will occur at the same time. Apr 14, 2015 at 23:28
• For each collision. Apply it three times (hence the three equations) to get the three unknown impulses. This is nothing new here. Read cs.cmu.edu/~baraff/sigcourse/notesd2.pdf on how to implement algos for multiple collisions. Apr 15, 2015 at 17:43

Its pretty much solvable.

Lets name the sides of the Hexagon in the order 1,2,3,4. When the hexagon A collides with B,C,D the 2-3 side collide with C and C moves in a direction of A and it will not effect all the other hexagons. Same way the side 1-2 will collide with D and give it motion in a direction perpendicular to side 1-2 and same for side 3-4... And we see due to symmetry the magnitude of velocity of hexagon D and B will be same.Breaking them in 2 component, one in the direction of A and other perpendicular to A. We will be able to solve for all the hexagons.

P.S.Can't make a good picture with description because of lack of Photoediting skills

• if you do that, you get more variables than equations
– user66432
Apr 14, 2015 at 13:59
• no man. I solved it. And we don't get more variables than equation. Apr 14, 2015 at 14:00
• if you could share it with us you could get the bounty
– user66432
Apr 14, 2015 at 14:12
• Could you write out what steps you took to solve? Apr 14, 2015 at 15:03
• But what about the velocity of A after the collision? I think it's not 0.. I think. Apr 14, 2015 at 15:55

The problem is ambiguous and has infinite solutions. The reason is that now you cannot ignore the relative forces between the A and B,C and D. For instance, if you solve the problem as non simultaneous collisions you will get a different answer depending on the order of the collisions. Suppose that A collides first with C, then A will stop, C will move at the initial speed of A, and B and D will remain at rest. If you instead make A collide with D and B first you will reach a different solution. In the real case of simultaneous collision for the 4 objects, you really need to also add as additional condition the relative forces between AB AC and AD (which is equivalent to freely chose one of the independent unknowns)

UPDATE: I played a little with the equations, and found (too large to type here) that the actual solution is a function of both the initial momentum of A and the amount of time during which the objects interact. Once you have that you can compute the normal forces between hexagons and then the relation between the momentum's transferred to them. I will leave that as an exercise to you.

• Ok. At least for this specific problem though, the forces between AB, AC, and AD are assumed to be zero. Shouldn't it therefore have only one possible solution? There are no other free variables, and I can't imagine throwing a hexagon at three others situated as shown and getting different results each time. Apr 1, 2015 at 16:13
• If you do that, then A will not interact with the other objects and the solution will be A "passing trough" them without changing its speed.
– user66432
Apr 1, 2015 at 16:16
• I'm stupid, I misread your post. I somehow thought you were talking about the general case in which there would be forces between bc,and dc, when you mentioned the relations between ac,ab,and ad. So I apologize, actual response: I believe that relation you mention at the end is precisely what I'm trying to find. I don't understand how/why/where theres a free variable. Apr 1, 2015 at 16:21
• I apologize, I didn't notice you updated your answer. Thank you very much for letting me know it is solvable. Before I accept it though, did you use anything besides conservation of force, conservation of momentum, and conservation of energy? If not, could I ask for some form of hint? I'm not simply trying to get my answer and move on - I've been working on this off and on for days now, and the exercise you left me with doesn't seem any different from the one I asked for help with in the first place.. Apr 3, 2015 at 18:16
• Actually, I revised my analysis and found some flaws. I will put a bounty to attract more attention
– user66432
Apr 7, 2015 at 23:26