# Geometry Nodes Equation/Method for bouncing objects?

I would like to have a bunch of cubes bounce in a specific space. I have set up a simple equation of abs(cos(x))/x which terminates after 3 bounces. It looks kinda okay except it's very bouncy and if you plot it you can see the bounces don't decay naturally. The acceleration slows down instead of remaining constant like gravity.

I'd like to just import the bounce interpolation native to blender. Is that possible in geometry nodes? Or is there some method I'm not thinking of?

• tbh this is more a physics/mathematics question, than a blender question, checkout this: physics.stackexchange.com/questions/256468/… -> so use that formula and it will be realistic May 23, 2022 at 10:31
• I think sine and cosine are not really good bases to model gravity because they slow down when approaching the local minima (acceleration decreases) when in reality the acceleration stays constant and the speed keeps increasing even when approaching the local minima (the ground). To answer your other question, the physics engine is not (yet) tied to geometry nodes trees so you can't have both in this way May 23, 2022 at 12:14

The way I tackled this problem was by using a different equation. The equation used is a damped sine wave. the equation I used bellow $${\displaystyle y(t)=A\cdot e^{-lt}\cdot \cos(\omega t-p )}$$

from the image you can see I use a random value for variance

for the absolute smoothing I used a smooth maximum to smooth out the bottom part a bit

## File

• This is probably the best I've seen for methods that don't include velocity. May 24, 2022 at 8:22

You can do a single pass of a bouncing ball easily:

• at frame 0 set the starting height of your ball and key frame it
• at frame N, where you want the ball to land, set the height of the ball to 0 and key frame it.
• go to the curve editor and set the interpolation type to bounce.
• set the animation length to N.

TBH this isn't a geometry nodes question and not a blender question, but of course you can do this, i just show you here the principle, because i believe your problem isn't geometry nodes, but the formula for realistic bouncing. You can check for a realistic formula here: https://physics.stackexchange.com/questions/256468/model-formula-for-bouncing-ball

How you can use mathematics and move an object in GN i show you here: