Rigid Body Collisions in golf


by Epidemius5
Tags: collision detection, golf ball
Epidemius5
Epidemius5 is offline
#1
May11-12, 06:31 AM
P: 5
hi there,
I have been working on this particular problem for some weeks?months? now, and it has me quite stumped. I need to calculate the x,y,z co-ords of a golf ball after it has been putted into a hole, when it contacts the opposite rim, assuming it is travelling fast enough to contact the other side.
The first problem is to find a function for the x,y co-ordinates in a cross section. I have tried to find the distance between the point where it will contact and the COM of the ball as it flies through the air, and when this distance equals the radius of the ball it will have contacted. however, this method rearranged to something crazy with I and stuff when i tried to find t. is based on the radius of the ball, radius of hole, and initial v by the way.
I tried various methods, and failed, to cut a long story short. I was wondering if anyone could think of a way to create a function for the impact co-ords in a 2 dimensional reference frame?
I ended up using an iterative method in MSexcel, calculating co-ords every small increment of time, and finding when co-ords are equal to rim of hole.
now, whether based on a funtion, or iteratively, moving this problem into 3 dimensions presents a problem, only if you change the angle the ball is putted in. i called this the impact parameter, which is the distance perpendicular to the direction the ball travels from the center of the hole to the center of the ball
the problem is to find the 3-dimensional location of the impact of the golf ball based in radius of ball, radius of hole, initial velocity, and impact parameter.
hopefully I've interested you enough to have a think about it :)
Phys.Org News Partner Physics news on Phys.org
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Mapping the road to quantum gravity
Chameleon crystals could enable active camouflage (w/ video)
A.T.
A.T. is offline
#2
May11-12, 07:39 AM
P: 3,554
If you want to simulate it correctly, you have to include this:



More info:
http://www2.eng.cam.ac.uk/~hemh/movi...ballincylinder

As for your imminent collision check problem. Simple geometry will tell you if a sphere intersects a cylinder, so you can solve this problem iteratively for any ball trajectory.
mfb
mfb is offline
#3
May11-12, 11:46 AM
Mentor
P: 10,864
You can remove the size of the ball from your equations by making the cylinder smaller. That should help.
For every flight path, the ball is restricted to a two-dimensional plane, given by the z-axis and the initial horizontal direction of movement. Your cylinder, restricted to this plane, just has a constant value at the horizontal axis, which allows you to solve the two-dimensional problem again.
The time to the impact is just given by the horizontal distance, divided by the horizontal velocity. This neglects air resistance.

Epidemius5
Epidemius5 is offline
#4
May11-12, 09:20 PM
P: 5

Rigid Body Collisions in golf


@mfb
are you meaning to say simulate the golf ball as a sphere? the problem is that although the balls flight is restricted to 2 dimensions, it could contact the hole outside of these 2 dimensions.
@A.T
wow.... i had not thought of that before... thats so COOL!
from both of you i'm getting the message that it wouldnt be possible to create a function to determine the contact point?
haruspex
haruspex is offline
#5
May12-12, 06:47 AM
Homework
Sci Advisor
HW Helper
Thanks ∞
P: 9,215
Quote Quote by Epidemius5 View Post
are you meaning to say simulate the golf ball as a sphere? the problem is that although the balls flight is restricted to 2 dimensions, it could contact the hole outside of these 2 dimensions.
Quite so.
There's also a nasty complication as the ball clears the leading edge of the hole. In general it will be deflected towards the centre of the hole, and computing this will get into horrible complications with gyroscopic effects and moments of inertia.
To have some hope, let's ignore that, as we can if the line is not too far off the hole's centre.
Let B be the radius of the ball, R the radius of the hole, H the horizontal displacement from hole's centre to path of ball, V the velocity. Let X, Y and Z be the co-ordinates of the point on the ball that strikes the far edge of the hole, relative to the centre of the ball at the moment of impact. Let T be the time from leaving near edge to striking far edge. L = √(R[itex]^{2}[/itex]-H[itex]^{2}[/itex])
We have:
X[itex]^{2}[/itex]+Y[itex]^{2}[/itex]+Z[itex]^{2}[/itex] = B[itex]^{2}[/itex]
(X+H)[itex]^{2}[/itex] + (VT-L+Y)[itex]^{2}[/itex] = R[itex]^{2}[/itex]
Z = gT[itex]^{2}[/itex]/2 - B

(Quick check: X=Y=T=0, Z=-B is a solution.)

We have 4 unknowns, X, Y, Z, T, but only 3 equations. We can eliminate any two of X, Y, Z (X and Z say) to leave an equation for the third as a function of T. This will be a quartic.
Here's the clever bit. In principle we can factorise the quartic to obtain (Y-a)(Y-b)(Y-c)(Y-d) = 0, where a, b, c, d are functions of T, possibly imaginary. At the moment of impact, a real root appears. In fact, it will be a repeated root, e.g. a in:
(Y-a)(Y-a)(Y-c)(Y-d) = 0
Look at what happens if we differentiate the LHS wrt Y. It still has a factor Y-a, so the expression obtained by differentiating the quartic is also 0 at moment of impact. This will be a cubic. We can combine the quartic and cubic (i.e. take the remainder of the quartic modulo the cubic) to obtain a quadratic in Y, then repeat the process with the cubic and quadratic to obtain Y (still as a function of T). Finally eliminate Y to obtain T.
The details I leave as an exercise for the reader
mfb
mfb is offline
#6
May12-12, 10:09 AM
Mentor
P: 10,864
You can simulate the ball in the cylinder as a point.

from both of you i'm getting the message that it wouldnt be possible to create a function to determine the contact point?
It is possible, and it can be done in an analytic way quite easily for your vertical cylinder if you know the initial parameters for the flight.
haruspex
haruspex is offline
#7
May12-12, 06:53 PM
Homework
Sci Advisor
HW Helper
Thanks ∞
P: 9,215
Quote Quote by mfb View Post
You can simulate the ball in the cylinder as a point.
I don't see how. The method you described before does not work. It overlooks the fact that the point of the ball which strikes the far edge of the hole will not be in a vertical plane through the flight path of the centre of the ball. It will be offset from that, away from the hole's centre, by the X in my equations.
Epidemius5
Epidemius5 is offline
#8
May13-12, 05:35 AM
P: 5
my current method to attack this problem is to analyse it from the reference frame across the top of the cylinder, i.e on the golf green. i can calculate the flight path, and then figure out the cross section of the sphere in the plane over the top of the cylinder, and figure out where it contacts the top of the cylinder. from this, i can find the COM of the sphere if it I know the flight path and the point of contact. however, I'm not the best at math, being 16, i havn't done calculus yet at my high school, which is why i fall back on iterative methods regularly. Do you guys think this method would be mathematically do-able?
so far:
radius of cross section at the top of cylinder:
sqrt(r^2-d^2)
where r=ball radius
where d=offset in center of ball from plane across the top of the cylinder
distance from center of cylinder to center of sphere in plane across top of cylinder:
sqrt(p^2+(v*t-sqrt(R^2-p^2)))
where p=distance perpendicular to balls path, from center of ball to center of cylinder
where v=initial velocity of ball
where t=time(for any point crossing the cylinder)
where R=radius of cylinder
point where sphere contacts cylinder:
sqrt(r^2-(r-(g*t^2/2))^2)=R-sqrt(p^2+(v*t-sqrt(R^2-p^2)))
this is when the shortest distance from the edge of the cylinder to the balls vertical axis equals the first equation i mentioned.
does this all seem sound? also, how would i go about finding x, y co-ords from this eqn? i have tried solving for t, but to no avail.
any help would be much appreciated
mfb
mfb is offline
#9
May13-12, 08:58 AM
Mentor
P: 10,864
Quote Quote by haruspex View Post
I don't see how. The method you described before does not work. It overlooks the fact that the point of the ball which strikes the far edge of the hole will not be in a vertical plane through the flight path of the centre of the ball. It will be offset from that, away from the hole's centre, by the X in my equations.
The ball with radius r will hit the hole with radius R if its center has the distance R-r from the center. In addition, the surface is always perpendicular to the (center of ball)-(center of hole)-line. Therefore, you can model the system as a hole with radius R-r and a point-like ball.
This does not work for the initial movement over the edge - but as long as the ball speed is high, its deflection there is small and can be approximated in some way.


@Epidemius5: Add a sketch, please. It is always hard to talk about 3-dimensional systems with words and a lot of new variables hanging around in the formulas.
Epidemius5
Epidemius5 is offline
#10
May13-12, 02:42 PM
P: 5
i would like to, but can't until i have 10 posts :(
haruspex
haruspex is offline
#11
May13-12, 04:35 PM
Homework
Sci Advisor
HW Helper
Thanks ∞
P: 9,215
Quote Quote by mfb View Post
The ball with radius r will hit the hole with radius R if its center has the distance R-r from the center. In addition, the surface is always perpendicular to the (center of ball)-(center of hole)-line. Therefore, you can model the system as a hole with radius R-r and a point-like ball.
You'll need to complete the model before I'll be convinced.
If you shrink the ball to a point, how high above the green do you have it on approach? Presumably zero. In that case it will never strike the opposite rim.
mfb
mfb is offline
#12
May13-12, 04:59 PM
Mentor
P: 10,864
@haruspex: Ok, I see the issue. I assumed that the ball falls deep enough to hit the walls, not the rim. If it does not, things get a bit more complicated. Maybe possible in an analytic way, maybe not.
haruspex
haruspex is offline
#13
May13-12, 05:36 PM
Homework
Sci Advisor
HW Helper
Thanks ∞
P: 9,215
Quote Quote by mfb View Post
Maybe possible in an analytic way, maybe not.
Do you see a problem with my analysis (#5)?
Epidemius5
Epidemius5 is offline
#14
May14-12, 01:01 AM
P: 5
I have a few questions about it, is H perpendicular to the path of the ball? and is X the axis along which the ball travels?
X^2+Y^2+Z^2 = B^2
(X+H)^2 + (VT-L+Y)^2 = R^2
Z = gT2/2 - B
where does the first eqn originate from? the second one is the eqn of the ball, yes? but view in which cross section? and shouldnt the last eqn be +B instead of -B?
haruspex
haruspex is offline
#15
May14-12, 01:17 AM
Homework
Sci Advisor
HW Helper
Thanks ∞
P: 9,215
H, X are horizontal, perpendicular to line of travel. L, Y are in the line of travel.
X, Y and Z are co-ordinates of impact point of ball relative to ball's centre. First eqn expresses that.
Relative to hole centre, impact point has co-ordinates (X+H, VT-L+Y, 0), hence 2nd eqn.
The sign of Z doesn't matter - you can orient it either way up. But it's either as I had it or -gT^2/2+B.


Register to reply

Related Discussions
Rigid body, need help Introductory Physics Homework 2
Rigid Body dynamics - elastic collisions Advanced Physics Homework 5
Linked Rigid Body Collisions General Physics 0
Rigid Body Collisions General Physics 10
rigid body Introductory Physics Homework 1