pooltool.physics.resolve.ball_ball¶
Models for ball-ball collisions.¶
Overview¶
A simple ball-ball collision model including ball-ball friction, and coefficient of restitution for equal-mass balls |
|
Ball-ball collision resolver for the Mathavan et al. (2014) collision model. |
|
A frictionless, instantaneous, elastic, equal mass collision resolver. |
|
An Enum for different ball-ball collision models |
Classes¶
- class pooltool.physics.resolve.ball_ball.FrictionalInelastic(friction: BallBallFrictionStrategy = AlciatoreBallBallFriction(a=0.009951, b=0.108, c=1.088))[source]¶
A simple ball-ball collision model including ball-ball friction, and coefficient of restitution for equal-mass balls
Largely inspired by Dr. David Alciatore’s technical proofs (https://billiards.colostate.edu/technical_proofs), in particular, TP_A-5, TP_A-6, and TP_A-14. These ideas have been extended to include motion of both balls, and a more complete analysis of velocity and angular velocity in their vector forms.
Bases:
pooltool.physics.resolve.ball_ball.core.CoreBallBallCollisionMethods:
- solve(ball1: pooltool.objects.ball.datatypes.Ball, ball2: pooltool.objects.ball.datatypes.Ball) Tuple[pooltool.objects.ball.datatypes.Ball, pooltool.objects.ball.datatypes.Ball][source]¶
Resolves the collision.
- Return type:
Tuple[pooltool.objects.ball.datatypes.Ball, pooltool.objects.ball.datatypes.Ball]
- class pooltool.physics.resolve.ball_ball.FrictionalMathavan(friction: BallBallFrictionStrategy = AlciatoreBallBallFriction(a=0.009951, b=0.108, c=1.088), num_iterations: int = 1000)[source]¶
Ball-ball collision resolver for the Mathavan et al. (2014) collision model.
The model “uses general theories of dynamics of spheres rolling on a flat surface and general frictional impact dynamics under the assumption of point contacts between the balls under collision and that of the table.”
The authors compare the model predictions to experimental exit velocities and angles measured with a high speed camera system and illustrate marked improvement over previous theories, which unlike this model, fail to account for spin.
References
Mathavan, S., Jackson, M.R. & Parkin, R.M. Numerical simulations of the frictional collisions of solid balls on a rough surface. Sports Eng 17, 227–237 (2014). https://doi.org/10.1007/s12283-014-0158-y
Available at https://billiards.colostate.edu/physics_articles/Mathavan_Sports_2014.pdf
Bases:
pooltool.physics.resolve.ball_ball.core.CoreBallBallCollisionMethods:
- solve(ball1: pooltool.objects.ball.datatypes.Ball, ball2: pooltool.objects.ball.datatypes.Ball) Tuple[pooltool.objects.ball.datatypes.Ball, pooltool.objects.ball.datatypes.Ball][source]¶
Resolve ball-ball collision via Mathavan et al. (2014).
This method computes the post-collision linear and angular velocities of two balls colliding on a rough surface, taking into account both ball-to-ball friction and ball-to-surface friction. The collision model is based on the method described by Mathavan et al. (2014), which considers point contacts and frictional impact dynamics between the balls.
The function transforms the velocities and angular velocities into a local coordinate frame defined by the line connecting the centers of the two balls at the point of collision. It then iteratively calculates the collision dynamics, including the effects of friction and restitution during the compression and restitution phases of the collision. Once the collision dynamics criteria are met, the updated velocities and angular velocities are transformed back into the global coordinate frame and returned.
- Return type:
Tuple[pooltool.objects.ball.datatypes.Ball, pooltool.objects.ball.datatypes.Ball]
- class pooltool.physics.resolve.ball_ball.FrictionlessElastic[source]¶
A frictionless, instantaneous, elastic, equal mass collision resolver.
This is as simple as it gets.
See also
This physics of this model is blogged about at https://ekiefl.github.io/2020/04/24/pooltool-theory/#1-elastic-instantaneous-frictionless
Bases:
pooltool.physics.resolve.ball_ball.core.CoreBallBallCollisionMethods:
- solve(ball1: pooltool.objects.ball.datatypes.Ball, ball2: pooltool.objects.ball.datatypes.Ball) Tuple[pooltool.objects.ball.datatypes.Ball, pooltool.objects.ball.datatypes.Ball][source]¶
Resolves the collision.
- Return type:
Tuple[pooltool.objects.ball.datatypes.Ball, pooltool.objects.ball.datatypes.Ball]
- class pooltool.physics.resolve.ball_ball.BallBallModel(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
An Enum for different ball-ball collision models
- FRICTIONLESS_ELASTIC¶
Frictionless, instantaneous, elastic, equal mass collision.
- FRICTIONAL_INELASTIC¶
Frictional, inelastic, equal mass collision. (https://billiards.colostate.edu/technical_proofs/new/TP_A-14.pdf).
- FRICTIONAL_MATHAVAN¶
Mathavan, S., Jackson, M.R. & Parkin, R.M. Numerical simulations of the frictional collisions of solid balls on a rough surface. Sports Eng 17, 227–237 (2014). https://doi.org/10.1007/s12283-014-0158-y
Bases:
pooltool.utils.strenum.StrEnum