Be the first to rate this file! 14 downloads (last 30 days) File Size: 136.71 KB File ID: #4460

Billiard Ball Animation

by Fahad Al Mahmood

 

09 Feb 2004 (Updated 17 Aug 2004)

Code covered by the BSD License  

This program animates the movement of a billiard ball.

Download Now | Watch this File

File Information
Description

This Program Performs the following:
(1) Animates the movement of a Billiard Ball on a table that has a surface friction (mu) and coefficient of restitution (e) for the sides and saves it as an AVI file.

(2) Outputs series of rows and columns that displays the stream data of (Time),(X),(Y),(V), and (th) to screen.

(3) Outputs the initial X-Y coordinates along with the final coordinated when the speed of the ball reaches zero.

(4) Plots 4 figures that shows:
    a- (X vs. Y).
    b- (Time vs. X).
    c- (Time vs. Y).
    d- (Time vs. Velocity).

(5) Saves the Above Plots as a (JPEG) file.

(6) Outputs series of rows and columns that displays the stream data of (Time),(X),(Y),(V), and (th) to a file.

TO RUN DEMO:
    billiard(-1)

MATLAB release MATLAB 7 (R14)
Other requirements AVI Player
Zip File Content  
Other Files Billiard MATLAB Program.pdf,
billiard.m,
billiard_input.m,
test_billiard.m,
theta_impact.m,
time_to_impact.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
06 Aug 2004 chang xin

it seems that an error happende in line 58

16 Aug 2004 Fahad Al Mahmood

To run the demo example, first copy and paste the following line:

billiard(-1)

the function (billiard) requires an input argument of (0,1 or -1). Please refer to documentation.

Please login to add a comment or rating.
Updates
11 Feb 2004

Image Changed

11 Feb 2004

Image Updated

25 Feb 2004

Image Added

12 Apr 2004

Category changed

17 Aug 2004

Modified Demo example.

Tag Activity for this File
Tag Applied By Date/Time
chemistry Fahad Al Mahmood 22 Oct 2008 07:14:11
physics Fahad Al Mahmood 22 Oct 2008 07:14:11
avi player Fahad Al Mahmood 22 Oct 2008 07:14:11
billiard ball Cristina McIntire 06 Feb 2009 10:09:44
animation Cristina McIntire 06 Feb 2009 10:09:44
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com