Code covered by the BSD License  

Highlights from
Billiard Ball Animation

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 136.71 KB File ID: #4460
image thumbnail

Billiard Ball Animation

by Fahad Al Mahmood

 

09 Feb 2004 (Updated 17 Aug 2004)

This program animates the movement of a billiard ball.

| 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
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

Contact us at files@mathworks.com