# physics help

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

## Recommended Posts

hi there. I have been working on a pool simulator in DarkBasic for a while now and it doesnt work correctly. And i cant see why.

so the problem is that when sliding on the table the balls angular velocity doesnt change as fast as it does in real life ( i have a pool table available so i have checked it over and over. (i also found some highspeed videos online which confirm the error)

I use the following to calculate the motion of the ball on the table:

where

V = vector for velocity of ball

W = vector for angular velocity of ball

P = vector for position of ball

Vt = vector for perimeter velocity at contact point ( with table)

R = vector from center of ball to the table ( length r)

m = mass ( 0.16 kg )

g = acceleration due gravity ( 9.81)

us = coefficient of friction while slipping (0.2) ( have tried all kinds of values)

ur = coefficient of friction while rolling (0.01)

x is cross product

d is delta

dt = time-step of the simulation ( on the order of 5x10^-5 )

Vt = (R x W) + V

if Vt = 0 then the ball is rolling without any slip

dV = -us*g*dt*(Vt/|Vt|)                                 (Vt/|Vt|) is the unit vector in direction Vt

V = V+dV

dW = [(-us*m*g*r*(Vt/|Vt|)]x R) * (5*dt)/(2*m*r^2)

W = W+dW

if the ball is rolling:

V = V-(ur*g*dt)*(Vt/|Vt|)

endif

Wz = Wz*(1-uz*dt)               where Wz is the z(perpendicular to table) component of the angular velocity and uz is a friction to slow it down ( nothing in the "real" physics would stop pure z spin)

this seems to produce approximately 10-15 times too weak dW. Why is this?

any help very much appreciated

##### Share on other sites

Where did you get the equation for dW? It's very difficult to dissect the entirety of this problem without knowing where the equations came from.

##### Share on other sites

sorry, i will clarify:

from newton, F = ma -> F = m*dv/dt

Fu = u*N                                                                            force of friction = coefficient of friction times normal force

Fu = u*m*g*(r?)

cant say i see why the r is there now that i think of it i got this from here where it says so but cant see why? maybe this explains it. with my radius of 0.02857 it would cause quite the difference at least.

Fu x R = torque caused by the friction force

T = I*a                                                                                 Torque = moment of inertia times angular accelleration

T = I*dw/dt

dw = T*dt/I

moment of inertia for a sphere is (2/5)*mass*radius^2

##### Share on other sites

The torque is given by R x F, not F x R.

In the z-direction: N=mg. In the forward direction: ma=-uNv^=-umgv^=f, where f is the force due to friction.

The torque on the contact point is then R x f = -umgr (r^ x v^) = I dw/dt, so dw = -(5ug)/(2r) dt (r^ x v^).

If Ww^ (magnitude and direction) is the current angular momentum, the update after euler integration is [ W w^ - ((5ug)/(2r)) (r^ x v^) dt ].

There is more analysis that could be done, but check if this sign change in the cross product does anything for you.

Edited by deekr