Perfectly centered break of a perfectly aligned pool ball rack 279 points by verandaguy on Feb 2, 2014 | hide | past | web | favorite | 67 comments

 Really cool problem! And great animations.I was disappointed to find that the associated notebook (http://math.bard.edu/belk/code/BilliardsHertz.nb) doesn't work correctly in either Mathematica 9 or 10 -- I think the author used 8.It seems like NDSolve falls down:NDSolve::smpf: Failure to project onto the discontinuity surface when computing Filippov continuation at time 0.`. >>and the solution shows the cue bool passing through all the others..
 Sorry about that. I really ought to upgrade to 9.Apparently Mathematica added some new features in version 9 that are intended to better handle differential equations with discontinuities (see http://reference.wolfram.com/mathematica/tutorial/NDSolveWhe...). Apparently this is getting tripped up at the boundary between the two behaviors.One simple thing that might work is to change the force law to either`````` force[disp1_, disp2_, dir_] := -k Abs[(disp1 - disp2).dir ]^(3/2) dir* If[(disp1 - disp2).dir > 0, 1, 0] `````` or`````` force[disp1_, disp2_, dir_] := -k Abs[(disp1 - disp2).dir ]^(3/2) dir* Piecewise[{{1, (disp1 - disp2).dir > 0}}, 0] `````` If these don't fix it, then you would need to play around with the options for NDSolve.
 Thanks for the help. Piecewise has the same problem, whereas the If is taking forever. How long should I wait before I kill it?
 There's a Mathematica 10 now, already? Interesting.I'm still a happy 8 user, myself. Is there much reason to upgrade?It'd probably be good for them to pay more attention to backwards compatibility...
 10 has Association expressions [1], which are a huge language addition (and long overdue). Seems there is some synchrony with Erlang on that front!The features I'm most excited about in 10 (disclosure: my team is working on some of these):[2] String, XML, file templating[3] Hands-free machine learning[4] Entity and EntityValue: semantic "hooks" to represent real world entities[5] Dataset, a general data modelling and query framework.Also, DateObject, TimeObject, interaction with external processes, multiple undo, a large number of updated data sources, the ExternalService "meta-api", device connections, time series stuff, GeoGraphics, and a long list of no less worthy features.
 Nice to see all the WolframAlpha features being brought over. I'd completely missed Entity and Dataset.Any chance you'll be including the templating features in the RPi version?
 Yup, although there is a bit of design change from the templating in the RPi version.
 I think he is confused. Wolfram's site only has Mathematica 9 listed
 > I think he is confused.You don't mean that the GP (taliesinb) is confused, do you?. He works for Wolfram Research, developing Mathematica.
 That is what I meant, but I guess I look like the fool now. I still don't see that Mathematica 10 has been released, but I guess it is close.
 It hasn't been released, but you can effectively get it on a Raspberry Pi: http://wolfram.com/raspi
 I'm going to go out on a limb and guess that v. 10 has not yet been released but is in common use internally at Wolfram.
 That is odd. Mathematica is usually good about backwards compatibility. That sounds like a change in the under lying numerical solver.
 Well, if it was a lying numerical solver...Seriously: I think they will make breaking changes if the existing code turns out to be mathematically incorrect. That may or may not have been the case here.
 This doesn't take into account rotation though :(See http://archive.ncsa.illinois.edu/Classes/MATH198/townsend/in... for including rotation.
 Also doesn't take into account the direction of the nap of the cloth on the table - balls rolling 'up' will travel differently from those rolling 'down'.Would this also mean that the speed of the balls has to be taken into account? The differing effects of friction on the surface would surely alter as the balls move & spin slower?
 What about air friction? And the the Coriolis effect? And does observing the balls cause their wave function to collapse? :P
 Yes! We demand to know whether the pool table was in the northern or southern hemisphere :)
 Tut tut! You're forgetting that the earth is an oblate spheroid, and gravity exerts greater downward force at the poles, than near the equator.We also need to know the precise latitude of the pool table!
 One might as well consider the gravitational gradient exerted by the surrounding terrain and significant celestial bodies, as well as the balls themselves. Should we collaborate on assembling such simulation, taking in account all known physical laws? Or has it been done already? Imagine how cool it would be to toggle different forces or constants and see the result change.
 Yes. Friction being constant is a lie that we tell middle school students. In undergrad physics you learn that there is also a linear and quadratic component. That is also a lie since even that assumes perfect balls, etc.
 Jim Belk was my math professor in college -- we always knew he was a much better programmer than he let on!
 Hi!
 It's pretty neat seeing someone from Bard on HN
 This is beautiful. I'd be curious about the results of a similar monte carlo simulation (or random variable statistics if possible) that had identical force laws but introduced random gaps between the balls.
 Weird, wasn't expecting to find that it was by my brother in law!
 Hi! This seems like a neat website -- kind of like early reddit.
 That's the aim, to be honest :)
 Woo! It is sort of a slashdot/reddit, since it focuses (almost) only on tech and startups.
 I didn't realize there was both mathoverflow.net and math.stackexchange.com. A quick glance at both looks like they serve largely the same purpose.Cool modelling in any case!
 I believe MathOverflow - a formerly non-SE site - targets graduate-level questions, while math.SE has a broader target user base.
 Yeah, MathOverflow was a SE 1.0 site (when we had white-label Stack Exchange networks rather than internally made ones) which has since been added into the real network with the SE 2.0 rollout. Math.SE and MathOverflow seem to function well together even they though have similar areas of interests.
 Could you explain the expression, "white-label?" First time I've heard it.
 The Wikipedia article explains the concept, but basically the initial business plan for Stack Exchange was to sell the software to companies / groups that wanted to run their own system versus the all in-house management we have today.
 This gives a decent explanation: http://en.wikipedia.org/wiki/White-label_product
 Can anyone explain the "rules" for a 3-way simultaneous colision? Freshman physics only covered collisions between 2 objects, and I've never figured out how to generalize it.
 Right, with 3 balls you can't just do an impulse calculation like you can with 2 (too many unknowns, too few equations).The author is simulating the collision as an event which happens gradually over an (admittedly short) period of time, using a differential equation, instead of something that happens all at once. That's why he has to talk about the elasticity model he's using, F ∝ (2-d)^1.5, and how the results vary when you change it.
 Could you get more equations by symmetry?
 Yes … in the symmetric case. That might give you enough to solve the first one-against-two collision. But the subsequent collisions in the pool break problem won't be symmetric (the velocity of the "incoming" ball is not perpendicular to the axis joining the centers of the other two).
 Hmm. How does the elasticity model provide the additional constraint needed to give an unique solution?
 It provides a way to apportion the impulse between the two simultaneous collisions. It behaves as a differential equation because the instantaneous force in each collision depends (via the elasticity model) on the instantaneous velocities of the balls, which in turn depend on how much momentum has already been transferred.
 What does the pattern of motion look like once they start bouncing off walls?What about if the table is frictionless?
 I'm no physics expert, but I can account for the second one -- if there's no friction, the balls just keep rolling
 Not necessarily; it might be possible to have some balls collide in such a way that at least one comes to a stop. At least one ball will keep moving though, and it isn't clear to me whether it is possible to prevent that moving ball from, eventually, hitting that stopped ball again. I think that would require at least three balls (ignoring pockets)
 This is a problem of energy conservation: the cue ball starts with E = 1/2 mv^2 kinetic energy and, no matter what, that same amount of energy has to exist afterwards in some form.But where will it go? In an elastic collision, a negligible amount of energy gets converted to heat (through inelastic deformation), and only a small amount will be converted to sound.The only other place the energy can go is kinetic energy distributed between the balls. This means that there's no way to cause the balls to collide such that they're stationary afterwards.Hypothetically, you might be able to completely convert the linear motion into rotational motion and have the balls spinning on the spot afterwards... but that's about it.
 That's why I wrote "At least one ball will keep moving, though". I agree it might be possible to convert all kinetic energy into rotational energy, but that requires you to be able to get a ball spinning. I think that requires friction, which the OP I replied to ruled out.
 I can't see how friction is factoring into the directions the balls initially scatter, as it's not taking the rotation of the balls into account. With that being said, wouldn't the balls all go in the same initial direction as they do in the linked example? Aka, the ones that are moving would move in that direction. Theoretically they could eventually bounce off walls and collide into each other in such a way that they eventually stop (though then there's the possibility of other balls that are still moving colliding into them later).
 > it might be possible to have some balls collide in such a way that at least one comes to a stop.can you give an example?
 If you just have two identical balls.
 ... but if you hit it hard enough what's the maximum number that will go in?
 Assuming there's no friction on the table, the chances ought to be pretty high that they'll all eventually go in.
 Once you start figuring out the elastic collisions with the rails, there's even more to consider. Rails are positioned such that the balls strike them on their northern hemispheres. Because the rails are a wedge, the ball will get pinched between the rail and the table. To understand this collision, you need to take into consideration the rotational momentum of the ball. This is easier to solve when it is a completely orthogonal collision with no lateral rotations.If the ball strikes the rail on an angle, the rails twist to absorb the impact and will recoil with a force that isn't just a simple reflection, but that also has a force vector tangent to the ball and back towards the origin. This directly affects the spin of the ball when it leaves the rail.Combined, a bounce off the rail is a very complicated collision. The net result of which has balls that strike the rail at lower velocities closely matching a reflection, but if struck with a higher velocity, the reflection straightens out into a bounce more perpendicular to the rail.In short, the rails are highly dependent upon the velocities at impact, and perhaps more so than at break, are affected by rotational momentum.
 That's why I always open pool games with a full-strength shot. Now there's SCIENCE to prove it.
 While this is great for a theoretical model, most professionals also try to put forward spin on the cue ball, to offset the collision and break apart the rack further. You may have noticed small white burn marks from the heat generated by the cue ball spinning on the felt, from the location where most people break.
 This is mostly incorrect. The chosen spin depends on several factors including the breaking position (as in breaking from "the box") and ball count. In this case it appears to be Eight Ball.The burn marks are caused by the downward force due to an inclined cue. Similar marks occur when performing a legal jump. This is why many tournaments provide a cloth scrap for breaking.Furthermore, the cue ball may hop to the rack and impact the head ball above its equator, causing the cue ball to jump in the air, reducing the likelihood of being kicked into a pocket. Top spin or forward roll is not required for this.Source: I play pool semi-professionally.
 Agree on the spin, I was assuming a perfectly vertical break.Abou the burn marks, see here http://www.pooldawg.com/article/pooldawg-library/table-maint...http://www.cuesight.com/types-of-pool-table-felt.htmlYeah, I hate it when the ball pops up, but my opponent looks cool catching it, heh. I also play pool. Best game for lounging I feel.
 Somewhat meta, but at what point does Stack Overflow transition from being a useful, time-saving tool and become a waste of everyone's time? The top answer author clearly put a ton of time on the answer. We are all now reading this. Is anyone able to apply any of the knowledge they gained from this Q&A to anything productive?
 This is a good question, and I sometimes do put too much time into answering questions on Math Stack exchange. Right now, though, I'm fairly happy with the time I put into this simulation.First of all, there's the fact that I did this on a Friday evening, after I came home from work. (I spent about six hours on it, and maybe another hour or two on Saturday morning). There are probably more productive uses of my time, but it was fun, and the most likely alternative was probably something like "read reddit" as opposed to "do something productive". It's nice to have leisure-time activities that are at least marginally related to my career.Speaking of which, here's a few reasons that this was helpful for me:1. I got a little better at programming in Mathematica. I use Mathematica a lot for both my teaching and research, so it always helps to practice.2. I learned about a whole field of physics called contact mechanics, which I otherwise wouldn't have been aware of. It's part of my job as a math professor to know about random things like this.3. I got some experience with modeling in applied mechanics problems. This may be helpful for me in the future -- as a professor at Bard, I regularly have to supervise senior math majors who want to work on research-level problems. The next time a senior who's interested in applied mechanics wants a research problem, I'll have one available.That's how it's helpful for me, but I suppose it's less clear that this was helpful for the rest of the world. I guess, at the very least, it certainly seems to have entertained a bunch of people, and maybe someone learned something about modeling or differential equations or physics.
 Thanks for both the answer on SO/MS and your comment here. You definitely shed some light on what I was wondering about.
 Yes, I have to say, I did not know there were generally accepted models of elastic collisions (i.e., the force/distance law used in the simulation).
 I presume you know the story of Feynman and spinning plates [1]. Sense of play is important for productivity, sometimes it is more than just important, it becomes a necessity`````` The diagrams and the whole business that I got the Nobel Prize for came from that piddling around with the wobbling plate. -- Richard Feynman``````
 For those whose day job is modelling pool breaks, this could be a time-saving tool.Actually, for anyone whose work involves modeling physics and collisions in general.The fact that it describes a phenomenon with which a great many people are familiar and at least casually interested is only one aspect of this. And there's a long history of useful discoveries and advances coming from gaming and gambling (going back to Blaise Pascal).
 You need to stop and smell the billiard-ball-shaped roses, my friend. Not every pursuit needs be in the name of industry. Some people enjoy mathematical puzzles for their own sake.
 Going to reply to my own post since I cannot edit it anymore to clarify.First, I am not saying that this is strictly a waste of time. In fact, I do love learning from things like this.Second, I am not saying we must always be working instead of stopping to try something different. I personally find switching focus very important and I think it's a great tool for a great many people. I find that when people learn something slightly outside of their field they suddenly are hit with a lot of new ideas they did not have before, so learning about random solutions to random problems can be a great way to spend your time.What I was trying to ask (not assert) was how answers like this come to be. I am somewhat astonished that I can ask pretty much any question on any given subject and a subject matter expert somewhere in the world will then proceed to spend hours putting together a detailed essay or demonstration (or both) of the concepts involved. What I wanted to know is who are these experts, why are they giving their expertise away for Internet Points (tm) and is this detracting from their actual work.My other question is whether it's possible that at some point the number of soft, open-ended questions on SO will reach a critical mass where most participants will flock to those rather than the specific and hard questions and detailed expert answers that SO became famous for. Clearly we are not there right now, but is it possible and is it going to happen?
 "What I wanted to know is who are these experts, why are they giving their expertise away for Internet Points (tm) and is this detracting from their actual work."While I don't know about this exact post, for most academics, such theoretical exercises are their work. 'Projects' like this are nice and small and contained. They also give you the opportunity to get 'real' questions from people who aren't as close to the material as you are, almost like 'customers', so if you use a question like this in a lecture, it's almost sure to capture the interest of students better than other textbook examples. While I don't teach many courses, I've used examples derived from hybrid 'real world' / theoretical questions as examples to explain our products.That said, I've surely spend time on questions that will never pay themselves back in such a way. You never know up front which ones will, so it's like playing the VC game - you 'invest' in 10 questions, with the knowledge that 7 will be duds, 2 will break even and the last one will (hopefully) be a home run.
 Stack overflow is clearly both an useful, time-saving tool and a "waste of time" (in the sense that it doesn't look directly productive). If you don't like these kind of questions, don't worry, there are plenty of useful questions and answers with a direct work-related application. The answers for your questions are not going to disappear just because there are another questions answered. You know that Stack Overflow has section on things like gaming and role-playing, right?By the way, I'd have loved an example like this a year ago, when I had a physics subject where elastic and inelastic collisions were studied. I'm pretty sure I'm not the only one.
 "Strange how much human progress and accomplishment comes from contemplation of the irrelevant." - Scott Kim

Applications are open for YC Winter 2020

Search: