File Exchange Pick of the Week

Our best user submissions

Playing Billiards in MATLAB 2

Posted by Brett Shoelson,

Brett's Pick this week is pool, by Husam Aldahiyat.

Today's quick Pick is all about escapism.

Back in grad school, I used to enjoy sipping a home-brew and shooting pool in my living room. Friends would come over, and we'd play for hours. Inevitably, the "real world" rears its head. I now have children, I haven't brewed beer in many years, and my wife won't let me have a pool table in my living room. (Of course, the kids are their own reward, but I can still reminisce, can't I?)

Husam's entry brought me back, for a few moments, to halcyon days, drinking beer and playing billiards. And it brought a smile to my face.

Simply type pool at your MATLAB prompt, and you'll be presented with a 3D-rotatable pool table. You can specify the shooting angle and stroke force, and press a button to shoot. Sink all six balls in any order without scratching, and you win!

Thanks, Husam. You brightened my day!

As always, comments to this blog post are welcome. Or leave a comment for Husam here.

Get the MATLAB code

Published with MATLAB® 7.14


Comments are closed.

2 CommentsOldest to Newest

William replied on : 2 of 2

I have the 2008b student edition of Matlab and I love pool but unfortunately this command doesn’t work for me. Do I need a certain version of Matlab?