WOLFRAM SYSTEM MODELER
BouncingBalls2DBouncing balls in 2D with collision detection |
![]() |
SystemModel["EducationExamples.Physics.BouncingBalls.BouncingBalls2D"]
A ball is dropped from a given height h, dropping onto a hard surface, and bouncing back according to the restitution coefficient e. This example shows the event handling capabilities of SystemModeler.
In order to get the full experience of this example, you need the following:
These pages show an overview of the example. For the full example, open the accompanying notebook BouncingBalls.nb.
View the model text for this model.
Simulate with a large number of different initial heights h the ball is dropped from and show the bounces of the ball.
Varying the coefficient of restitution or the gravity shows different behavior.
Also see the balls bouncing in a 2D space in BouncingBalls2D.
This domain example is an informational resource made freely available by Wolfram Research.
All content in this bundle is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. By accessing the content or using it in any way, you accept and agree to be bound by the terms of this license. If you do not agree to these Terms of Use, you may not use this content. Wolfram Research reserves the right to change, modify, add to, or remove portions of these Terms of Use at any time without notice. Please refer back to www.wolfram.com for the latest Terms of Use.
A summary of the licensing terms can be found at:
http://creativecommons.org/licenses/by-nc-sa/3.0
The full legal code can be found at:
http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode
g |
Value: 9.81 Type: Real Description: gravity acceleration |
---|---|
nr |
Value: 5 Type: Integer Description: number of balls |
aInit |
Value: zeros(nr, 2) Type: Real[nr,2] Description: initial acceleration |
wallx |
Value: 6 Type: Real Description: distance along the x-axis to the wall from the center |
wally |
Value: 10 Type: Real Description: distance along the y-axis to the wall from the center |