News for hackers. Stuff that matters.
Re:Perfectly centered break of a perfectly aligned pool ball... by taliesinb on Sunday February 02, 2014 @09:27PM (#7168495)
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..

Re:Perfectly centered break of a perfectly aligned pool ball... by jimbelk on Sunday February 02, 2014 @10:17PM (#7168612)
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.
Re:Perfectly centered break of a perfectly aligned pool ball... by taliesinb on Sunday February 02, 2014 @10:38PM (#7168684)
Thanks for the help. Piecewise has the same problem, whereas the If is taking forever. How long should I wait before I kill it?
Re:Perfectly centered break of a perfectly aligned pool ball... by sillysaurus2 on Sunday February 02, 2014 @09:39PM (#7168520)
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...

Re:Perfectly centered break of a perfectly aligned pool ball... by taliesinb on Sunday February 02, 2014 @10:33PM (#7168664)
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.

[1] http://reference.wolfram.com/language/guide/Associations.htm...

[2] http://reference.wolfram.com/language/guide/WorkingWithTempl...

[3] http://reference.wolfram.com/language/guide/MachineLearning....

[4] http://reference.wolfram.com/language/ref/Entity.html

[5] http://reference.wolfram.com/language/ref/Dataset.html

Re:Perfectly centered break of a perfectly aligned pool ball... by nswanberg on Monday February 03, 2014 @02:27PM (#7172882)
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?

Re:Perfectly centered break of a perfectly aligned pool ball... by taliesinb on Monday February 03, 2014 @03:59PM (#7173443)
Yup, although there is a bit of design change from the templating in the RPi version.
Re:Perfectly centered break of a perfectly aligned pool ball... by ballstothewalls on Sunday February 02, 2014 @10:02PM (#7168566)
I think he is confused. Wolfram's site only has Mathematica 9 listed
Re:Perfectly centered break of a perfectly aligned pool ball... by prakashk on Sunday February 02, 2014 @11:59PM (#7168950)
> I think he is confused.

You don't mean that the GP (taliesinb) is confused, do you?. He works for Wolfram Research, developing Mathematica.

Re:Perfectly centered break of a perfectly aligned pool ball... by ballstothewalls on Monday February 03, 2014 @12:43AM (#7169062)
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.
Re:Perfectly centered break of a perfectly aligned pool ball... by nswanberg on Monday February 03, 2014 @02:39PM (#7172916)
It hasn't been released, but you can effectively get it on a Raspberry Pi: http://wolfram.com/raspi
Re:Perfectly centered break of a perfectly aligned pool ball... by Steuard on Monday February 03, 2014 @11:30AM (#7171534)
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.
Re:Perfectly centered break of a perfectly aligned pool ball... by matthewi on Sunday February 02, 2014 @09:48PM (#7168536)
That is odd. Mathematica is usually good about backwards compatibility. That sounds like a change in the under lying numerical solver.
Re:Perfectly centered break of a perfectly aligned pool ball... by Someone on Sunday February 02, 2014 @10:17PM (#7168614)
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.