EECS 396/600: 3-D COMPUTER GRAPHICS FOR SIMULATION

Project: "Simulation framework for evaluating dynamics of a Snooker Ball"

Introduction

Background

 Methodology

Results

Download

 

Introduction

The project titled "Simulation framework for evaluating dynamics of a Snooker Ball" deals with the simulation of the collision between snooker balls in the real world, considering frictional forces and the spin between the two balls when they collide with each other.  An extensive study is done in order to understand the behavior of the snooker ball under various real world forces and formulated to get the mathematical model of the snooker ball.

For Example: The two balls shown above in the figure, have just collided. The blue one was traveling down, and the red one was moving upwards ( a and b vectors). At the collision, each sphere feels an impulse from the other one. Both impulses are equal in size, and exactly opposite in direction (Green line). The impulse vector is perpendicular to the contact surface of the two balls, which implies that it is along the line from the center of one sphere to the center of the other.

Background

Consider two spherical objects (balls) one of mass m1 and the other of mass m2. Let's set things up so these balls are approaching each other along the line joining their centers, a recipe for a head on collision. Let these balls not be rotating or vibrating. The motion is purely translation. Under these conditions we may choose a reference frame which is one dimensional, with the objects on the x-axis.

Applying the conservation of linear momentum to this situation we have,

m1v1i + m2v2i = m1v1 + m2v2

where vi is the initial velocity of each object and v is the final velocity of each object. The conservation of kinetic energy gives us the equation

m1v1i2 / 2 + m2v2i2 / 2 = m1v12 / 2 + m2v22 / 2

These may be rewritten as follows:

m1 (v1i - v1) = m2 (v2 - v2i)

for the momentum equation and

m1 (v1i2 - v12) = m2 (v22 - v2i2)

for the energy.

As long as the difference between final and initial velocities is not zero for either object (meaning a collision actually happens), we may divide the second equation by the first one which yields

v1i + v1 = v2 + v2i or v1i - v2i = v2 - v1

In other words in a one dimensional elastic collision, the relative velocity of approach before the collision equals the relative velocity of separation after collision.

To get the final velocities in terms of the initial velocities and the masses, you would solve the last equation above for v2 and plug that into the momentum equation and solve to get

v1 = v1i (m1 - m2) / (m1 + m2) + v2i (2 m2) / (m1 + m2)
v2 = v1i (2 m1) / (m1 + m2) + v2i (m2 - m1) / (m2 + m1)

So we have the basis for a model of a one dimensional elastic collision. For initial conditions v1i and v2i, if a collision happens, the final velocities depend on the masses as above.

Now if the two masses, m1 and m2 are equal we can replace both with simply m, like this.

v1 = v1i (m - m) / (m + m) + v2i (2 m) / (m + m)

Likewise,                        v2 = v1i (2 m) / (m + m) + v2i (m - m) / (m + m)

This reduces to the following expressions for final velocities v1 and v2.

v1 = v2i and v2 = v1i

In the case of equal mass collisions, the two objects just exchange velocities. Of course if the initial velocity of one of the balls were zero, then the one colliding with it would just stop and the hit ball would take off at the original speed of the incoming ball.

In general case of central and absolutely elastic collision of objects with different masses, one of which was still before collision (v2i =0), the velocities of the objects after collision can be described by the equations:

v1 = v1i (m1 - m2) / (m1 + m2)
v2 = v1i (2 m1) / (m1 + m2)

If the mass m1 of incoming ball is greater than the mass m2 of the still one, then after collision both velocities v1 и v2 will be positive and the balls will move in one direction, which coincides with the direction of initial motion of incoming ball.

If the mass m1 of incoming ball is smaller than the mass m2 of the still one, then after collision v1 <0, v2 >0 and the balls will move in opposite directions and since 2m1>m1-m2 small ball will be reflected with the greater speed.

Let us consider the case when the ball 1 collides the ball 2 without the friction. We shall suggest that the ball 2 of mass m2 is in the rest before collision and the ball 1 of mass m1 is moving with velocity v. The velocity v1 of ball 1 and velocity v2 of ball 2 after collision will depend upon the "aiming" distance d , which is equal to the distance between the center of the ball 2 and the line of the motion of the ball 1 before collision. The collision will happen if d < r1 + r2, where r1 and r2 are the radiuses of the ball 1 and ball 2 consequently. The force applied to ball 2 during collision from the side of the ball 1 is directed along the line joining the centers of the balls. So, after collision the ball 2 will move at angle q as shown in the figure.

(r1 + r2) sin q = d

During the collision the energy and momentum of the motion is constant:

       

From these equations we can find

If m1<<m2 the picture of the momentum of balls is shown in the figure (p=mv, p1=mv1, p2=mv2). We can see from this figure that in the case of frontal collision (q = 0) p2> 2p, p1> -p. In any case the velocity of the ball 1 is changed by the direction, not by the value. The velocity of the heavy ball 2 after collision will not exceed the value v2=2vm1/m2.

 

 

Methodology

Now, considering the friction and spin during the collision of two balls, we have Sliding and Rolling Friction for our Model.

Sliding friction acts only when the snooker ball slides. This happens usually when the snooker ball is hit initially. But as the ball slides, after some time the ball starts to roll and the sliding friction disappears. Now Rolling friction acts on the ball.

The parameters are:-

Lets say the sphere is moving with a velocity of Xvel and Yvel in X and Y directions respectively and with a magnitude of V. Then the equations for the snooker ball when it is sliding are :

X acceleration =  -( Sliding Friction Co-eff * Gravitaional Constant )* (Xvel / Velocity);

Y acceleration =  - ( Sliding Friction Co-eff * Gravitaional Constant )* (Yvel / Velocity);

Zspinacc = - Z Friction Co-eff * Gravitaional Constant * sign( Zspin );

Xvel = Xvel + Xacceleration * delta_t ;

Yvel = Yvel + Yacceleration * delta_t ;

X acceleration =  -( Rolling Friction Co-eff * Gravitaional Constant )* (Xvel / Velocity);

Y acceleration =  - ( Rolling Friction Co-eff * Gravitaional Constant )* (Yvel / Velocity);

Zspinacc = - Z Friction Co-eff * Gravitaional Constant * sign( Zspin );

Xvel = Xvel + Xacceleration * delta_t ;

Yvel = Yvel + Yacceleration * delta_t ;

Xspin = - ( Yvel / Radius);

Yspin =  ( Xvel / Radius);

Let us now consider friction and spin during collision between two snooker balls. The initial parameters of the snooker balls before collision are given by :-

Initial position of ball A in X direction is  axpos  and aypos in y direction.                

Initial position of ball B in X direction is  bxpos  and bypos in y direction.    

Initial acceleration of ball A in X direction is  axacc  and ayacc in y direction.                            

Initial acceleration of ball B in X direction is  bxacc  and byacc in y direction.    

Initial velocity of ball A in X direction is  axvel  and ayvel in y direction.      

Initial velocity of ball A in X direction is  axvel  and ayvel in y direction.    

Initial spin of ball A in X direction is  axspin, ayspin in y direction and azspin in Z direction.

Initial spin of ball B in X direction is  bxspin, byspin in y direction and bzspin in Z direction.

Initial spin acceleration of ball A in X direction is  axspinacc, ayspinacc in y direction and azspinacc in Z direction.       

Initial spin acceleration of ball B in X direction is  bxspinacc, byspinacc in y direction and bzspinacc in Z direction.   

FORCE_COEFF = 0.5 * BALL_MASS * OMEGA * OMEGA; 

where omega is PI / COLLTIME;

dx = bxpos - axpos;                   dy = bypos - aypos;                   sep = hypotenuse(dx, dy);

Radial force due to the impact is given by:-

          Radial force = FORCE_COEFF * (2.0 * Radius - sep)

Impact points with respect to centers for each ball are:-

aximp = ximp - axpos;

ayimp = yimp - aypos;

bximp = ximp - bxpos;

byimp = yimp - bypos;

Velocities at the impact point are given by

axvi = axvel - azspin * ayimp;

ayvi = ayvel + azspin * aximp;

azvi = axspin * ayimp - ayspin * aximp;

bxvi = bxvel - bzspin * byimp;

byvi = byvel + bzspin * bximp;

bzvi = bxspin * byimp - byspin * bximp;

Relative (Slipping) Velocity at the impact point are:

rvx = bxvi - axvi;

rvy = byvi - ayvi;

rvz = bzvi - azvi;

rvmag = sqrt(sqr(rvx) + sqr(rvy) + sqr(rvz));

Force due to friction between balls:-

ffx = ball_ball_friction * Radial force * rvx / rvmag;

ffy = ball_ball_friction * Radial force * rvy / rvmag;

ffz = ball_ball_friction * Radial force * rvz / rvmag;

Total force is given by:-

Total force = Radial force – Force due to friction between balls

New acceleration = Total force / Ball Mass

New Velocities =Velocity + New Acceleration * delta time

New positions = New Velocities * delta time

Rotational motion change due to tangential force.

axspin = axspin + ayimp * force due to friction between balls in Z direction * delta time/ Moment of Inertia;

ayspin += - aximp * ffz * delta time / Moment of Inertia;

azspin += (+ aximp * ffy - ayimp * ffx) * delta time / Moment of Inertia;

bxspin += - byimp * ffz * delta time / Moment of Inertia;

byspin += + bximp * ffz * delta time Moment of Inertia;

bzspin += (- bximp * ffy + byimp * ffx) * delta time / Moment of Inertia;

Results and Conclusion

The simulated model shows that the mathematical model for the snooker balls is correct while taking into consideration various forces in the real world. The real world collision between two snooker balls is simulated in this project.