Bouncing Smiley Face

Exaggerated and somewhat cartoonish simulation of the physics of a bouncing smiley face.
3,5K download
Aggiornato 25 feb 2009

Visualizza la licenza

The laws for rotation are probably wrong (I made them up actually), but that's not what this file is about. Shown here is a very simple code that creates a nice animation, which can be quickly edited to suit anyone's needs.

The parameters are ball radius, gravity, initial velocity in the Y direction, initial velocity in the X direction, vertical speed conservation (%), horizontal speed conservation (%) and initial angular velocity.

Please note that the ball may stop moving at different locations for different trials, even with the same input parameters. This is due to the slight randomization of the deformations of the ball and the ground, which could lead to the ball getting "stuck" to the ground at times and stopping there. This is normal and deliberate.

Set the vertical speed conservation as a value larger than 100 (e.g. 130) for a small bonus ;)

Cita come

Husam Aldahiyat (2024). Bouncing Smiley Face (, MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2007a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Scopri di più su Just for fun in Help Center e MATLAB Answers

Ispirato da: Bouncing Ball Physics

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release

Code now works on systems without the Image Processing Toolbox.

Fixed eccentricity error, horizontal conservation error.