Unable to predict rebounding angle of a body

Official forum for the Chipmunk2D Physics Library.

Unable to predict rebounding angle of a body

Postby sakkeerhussainp » Mon Oct 03, 2016 10:37 am

Hi All,

I am developing a carrom board game, and it is working fine as expected. Now I would like to have a prediction for my users before they strike.

I could calculate distance striker can travel with a specific force(not using proper physics equation). I was calculating rebound angle of each carrom hit and come back from board wall with an assumption that incident angle will be equal to rebound angle. Since I am using 0.6 elasticity for each carroms rebound angle from wall is changing depending on the force applied.

Could any one of you please explain how I can calculate exact distance a carrom can travel and the angle of rebound using physics equation?

Physical details of bodies:
Density of Striking carrrom : 2
Density of normal carrom : 1
Space damping : 0.5

Please let me know if ant other details required.
sakkeerhussainp
 
Posts: 5
Joined: Mon Oct 03, 2016 10:20 am

Re: Unable to predict rebounding angle of a body

Postby slembcke » Mon Oct 03, 2016 11:58 am

For a perfectly elastic collision, the incoming angle is the same as the outgoing angle. Elasticity changes the tangent value of that angle.

angle_of_reflection = atan(elasticity * tan(angle_of_incidence))

A diagram might help:
Image
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Unable to predict rebounding angle of a body

Postby sakkeerhussainp » Mon Oct 03, 2016 1:14 pm

Hi Slembcke,

Thanks a lot for your reply.

According to your answer rebound angle is only depends on value of elasticity. For me elasticity of board is 0.9 and elasticity of carrom is 0.6, which one should be considered? Or its mean?

From my random test in what I implemented using chipmunk engine, I noticed that velocity of colliding body is affecting rebound angle. When I tried same angle and force of incident with different velocities(impulse applied), I noticed that the rebound angle is changing according to the velocity applied in directly proportional manner. Is there any issue in what I implemented already?
sakkeerhussainp
 
Posts: 5
Joined: Mon Oct 03, 2016 10:20 am

Re: Unable to predict rebounding angle of a body

Postby slembcke » Mon Oct 03, 2016 1:29 pm

Ok. Well there are a lot more variables involved if you want to predict exactly what Chipmunk will do. ;)

First of all, the above equations only work when there is no friction, and that the object does not rotate because of the collision. So it won't really work for something other than a frictionless circle. If you need to exact outcome of the simulation, then you need to run the whole simulation. There isn't really shortcut for that.

sakkeerhussainp wrote:For me elasticity of board is 0.9 and elasticity of carrom is 0.6, which one should be considered? Or its mean?
Multiply them together. Alternatively, you can calculate your own elasticity in a collision callback (http://chipmunk-physics.net/release/Chi ... Properties).
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Unable to predict rebounding angle of a body

Postby sakkeerhussainp » Tue Oct 04, 2016 1:00 am

slembcke wrote:First of all, the above equations only work when there is no friction, and that the object does not rotate because of the collision. So it won't really work for something other than a frictionless circle.


Hi Slembcke,

Will I get the exact angle of rebound by considering above equation you provided along with reverse force due to friction?
sakkeerhussainp
 
Posts: 5
Joined: Mon Oct 03, 2016 10:20 am

Re: Unable to predict rebounding angle of a body

Postby slembcke » Tue Oct 04, 2016 9:18 am

Exact, no. Very close, probably.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Unable to predict rebounding angle of a body

Postby sakkeerhussainp » Wed Oct 19, 2016 9:28 am

Hi Slembcke,

Could you provide any point to calculate the reverse force due to friction?
sakkeerhussainp
 
Posts: 5
Joined: Mon Oct 03, 2016 10:20 am


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest

cron