Grasshopper

algorithmic modeling for Rhino

How to simulate the colliding balls in a newton cradle?


I am using Kangaroo to simulate how the ball collides in the Newton cradle. to make it simple, I started with two balls.

I managed to make the ball swings and collides..
but the swing motion is not regular and the two balls can still intersect each other.

 

How can i improve my script?

1) I use springe as the tension of the ropes.

2)use unary force as gravity

3) i add and extra springe which got upper cutoff = radius of sphere*2

   which got negative stiffness, act as an oppose force, simulating how the ball bounce back when they hit each other

4) add and PLaw which has cutoff=  radius of sphere*2

I am wondering should i use the extra springe with negative stiffness to simulate the bounce back ....because it works like PLaw.....
but when I unable the extra springe, the balls flies in a more irregular manner.

 

I thought it must be something wrong with the intensity of forces. I did move the slider of each forces but it didn't turn better.

 

Views: 1191

Attachments:

Replies to This Discussion

this is what i have done.

but its not perfect can any one help me ? 

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service