# when does a ball roll down a ramp and when does it bounce off it?

This topic is 3899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I’m working on a simulation of a ball and a ramp (you can see what I have so far, as a java applet, at http://david-w.net/fyp/lab.html) I have the ball bouncing (and it can appear to roll down if the distance it bounces is incredibly small!) I also know how to make it roll down the ramp correctly (accelerating properly etc) What I don’t know is how you can work when a ball is going to start rolling down a ramp and when it will bounce down/off it. In other words, if you know a collision has taken place and you know the velocity of the ball etc how do you know if you should make the ball bounce off the ramp or roll down it? Any help would be really appreciated.

##### Share on other sites
There isn't a fine line, or some inequality that you check to determine when not to bounce. Your object should have a restitution factor [0,1] which scales the collision response impulse (which is always applied in the normal direction).

In a sort of independent system. The relative energy between the two bodies at the contact point will be used to calculate friction. Combining the friction force with a low resitution and your ball will fall on to the ramp, bounce a little bit, and then begin to roll.

edit: However, you *could* use an inequality to compare the ratio of normal velocity to tangent velocity after collision and if its under a threshold just zero the normal velocity. But that's just a small hackalack I can think of to cause the body to "sit" nicely.

Also, if you're using a seperation vector method for collision response then you can get away with using a negative restitution value. This will cause the energy of the collision to actually try to suck the bodies together. Combined with your seperation to stop the actual penetration, this should eliminate all bounce.

##### Share on other sites
The situation you are asking about is, as I understand it, that you have a stationary ball at the top of the ramp that you apply a force to. I think that if the force applied to the ball, F, minus the frictional force, f, is greater that the gravitational force, Fg, then the ball would bounce. Otherwise, it should just roll down the hill.

f = mu(friction constant) * mg cos(angle of incline)
Fg = mg sin(angle)

where the angle is measured from the horizon.

Then if:

F - f > Fg, the ball should bounce
F - f < Fg, the ball will just roll

edit: F should be the horizontal component of the applied force.

[Edited by - Chaotic_Attractor on March 18, 2008 1:22:59 PM]

##### Share on other sites
With perfectly hard objects (instantaneous collision response), and a non-zero coefficient of restitution, an object dropped onto a ramp will always bounce. To do it properly you would have to implement soft body collision mechanics, which is likely to be overkill unless you need it anyway.

So I recommend some form of 'if the normal rebound speed is less than some value, set it to zero and start rolling mode' hack, personally. Sometimes doing it now is better than doing it right.

1. 1
Rutin
71
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633428
• Total Posts
3011822
• ### Who's Online (See full list)

There are no registered users currently online

×