• Create Account

Banner advertising on our site currently available from just \$5!

# noobnerd

Member Since 08 Nov 2011
Offline Last Active Feb 05 2013 07:07 AM

### physics help

31 January 2013 - 09:52 AM

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 = radius of ball

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

### sphere vectors 2D to 3D

08 January 2013 - 02:21 PM

hi everyone and thanks for helping me with the questions ive asked so far.

I have encountered yet another problem in my billiards (pool) game, when trying to do a kind of selector which allows you to select where on the ball you want to hit.

I want to have a circle which symbolizes the side of the cue ball facing you. you can then click anywhere on the surface of the circle to select the spot you want to hit. now to calculate the change in agular velocity i need the vector (3D) that goes from the center of the ball to the point which i just selected. That is a radius to the surface of the ball. considering that the ball is "pointing" in the direction that you are going to shoot it means that if you select the precise center of the ball you are going to get the vector  -F/|F| r   that is the vector in the vector in the opposite direction of the shot that has length r which is the radius.

can anyone help me with this? if my formluation was confusing i will try to draw it somehow.

cheers

### shadow on plane

20 December 2012 - 03:15 PM

Hi

im trying to work out how to get the "shadow" of a sphere which is positioned on a plane. The light is a point somewhere above the sphere. The shadow will be a cone/plane intersection that is a ellipse or maybe a parabola/hyperbola in weird cases. what i would like is the 2 radii for the ellipse and the points where the ellipse "starts" and "ends" so i might stretch a pre made "shadow" image to the right size and just place it there. Has anyone encountered this before?

thank you for your time

### billiard/pool balls

17 December 2012 - 01:34 PM

Hi

I am doing a pool simulator (billiard) and have found a problem im not sure of how it works in real life. When 2 balls collide they impart rotation onto each other ( this i have tested my self and found true ) but im confused as to how much? i can work out the tangential velocities of the balls at the point they collide and this i guess combined with some coefficient of friction would do the trick, but is this how it works? is friction dependant on velocity?

sorry if confusingly explained and for the english.