File Exchange Pick of the Week

Our best user submissions

Hour Glass 1

Posted by Sean de Wolski,

Sean‘s pick this week is hourglass by Tillmann Stuebler.

Do you ever present with MATLAB? As an application engineer, this is a core part of my job. However, even with as exciting
as MATLAB is, we still need to take breaks occasionally. Usually, I’ve either used Mike’s mechanical clock or the Sysinternals tool ZoomIt which has a timer to show on the screen during the break.

But lo and behold those are now obsolete with Tillman’s hour glass! He uses ode45 to solve for the positions and velocities of sand falling through a glass timer. The animation runs indefinitely until you close the figure.

Here’s a screen shot of it running; I won’t give away the whole animation.

Note I turned off some of the figure decorations by modifying line 137:

fig=figure('Name','Hour Glass','color','k','MenuBar','none','ToolBar','none','NumberTitle','off');

My only request for this would be an option to have it run for a certain amount of time like a real hour glass, perhaps just
by pausing between time steps.

Comments

Give it a try and let us know what you think here or leave a comment for Tillmann.

Get the MATLAB code

Published with MATLAB® R2016b

Note

Comments are closed.

1 CommentsOldest to Newest

Tillmann replied on : 1 of 1

Thanks for placing my submission here! Sean, i think slowing down the animation will make it look unrealistic. Better option would be making the particles smaller and varying the number of particles. But this might cause excessive computation time because n^2 forces need to be calculated. Another option is tuning friction parameters. I’ll try it out ;)