Page **1** of **1**

### [SOLVED] Newton's cradle not transforming force properly

Posted: **Thu May 26, 2016 11:14 am**

by **benelot**

So I started working on an example for the example browser of Bullet Physics and I would like to get the Newtonian pendulum (Newton's Cradle) to work properly. However, if one pendulum hits the 4 others, they all somehow move a bit and not only the one on the other side. I am using restitution to get the pendula fully elastic (max realistic restitution is 1, right?), also I found out that there is a hitFraction, but it does not do anything visible. Any idea on how to fix this? I appended my example files. You can move the pendulum using key 3, and change the lengths of the pendula using key 1 and 2.

Here is a video of what I see with 5 and 3 pendula:

https://youtu.be/leDccYvnRzU

### Re: Newtonian pendulum not transforming force properly

Posted: **Sun May 29, 2016 4:31 pm**

by **Basroil**

Took a look at the code and video but haven't added it to my project yet so can't say the following is 100% accurate/going to fix it, but:

-Video looks like it's doing what it's supposed to, at least from a theoretical perspective. In one step there's zero motion so zero propagation. Even in real-world the momentum transfer isn't instantaneous. The multibody method might work a bit better, but not sure if the setup would be as trivial

-From the above, there's currently no room for motion, so maybe adding a bit of empty space will help. Propagation will end up taking n frames (n=pendulums-2), but it will likely be a bit more visually correct

- Similarly, you can try using a smaller time-step and more rigid solver, or even multibody

I might try it out in the morning after tuning my example a bit (need the right defaults to show off the methods).

### Re: Newtonian pendulum not transforming force properly

Posted: **Wed Jun 01, 2016 7:04 pm**

by **benelot**

Hello Basroil,

Thanks for posting, small spaces between the balls indeed make it slightly more realistic. Still it does not make it move in a perfect force transformation manner (

https://www.youtube.com/watch?v=JadO3RuOJGU), but who cares. It is well enough for an example. I will quickly try different solvers and a smaller timestep, maybe it helps.

Edit: The problem was stupidly simple, I forgot to set the intial restitution to 1. So the force did not propagate, only after a slight move of the restitution slider, which set the restitution for the first time.