Basic Examples 
(2)
 

Create a simple model with a falling ball and a fixed floor:
In[7]:=
model=
CreatePhysicsModel
​​
PhysicsBoundaryBox
[{{-4,-4,0},{4,4,6}},"Thickness"->1],​​
FixedBody
[{HatchShading[.6,Blue],Cuboid[{-4,-4,-1},{4,4,0}]}],​​
DynamicBody
[{MaterialShading["Gold"],Sphere[{0,0,5},0.6]}],​​

Out[7]=
PhysicsModelObject
Dynamic bodies: 1
Fixed bodies: 7
Time: 0.000

Plot the model in its initial state:
In[8]:=
PhysicsModelPlot
[model]
Out[8]=
Evolve the model for 300 steps with time step 1/60:
In[9]:=
frames=
PhysicsModelEvolve
[model,300,1/60];
Generate a video from the frames:
In[10]:=
PhysicsModelVideo
[frames,PlotRange1.01`{{-5,5},{-5,5},{-1,6}}]
Out[10]=
Create a model with four balls with various levels of bounciness:
In[7]:=
model=
CreatePhysicsModel

PhysicsBoundaryBox
[{{-4,-4,0},{4,4,6}},"Thickness"->1],
FixedBody
[{HatchShading[.6,Gray],Cuboid[{-4,-4,-1},{4,4,0}]},"Restitution"->1.0],
DynamicBody
[{MaterialShading["Gold"],Sphere[{-2.5,0,5.0},0.5]},"Restitution"->0.95],
DynamicBody
[{MaterialShading["Copper"],Sphere[{-0.8,0,5.0},0.5]},"Restitution"->0.6],
DynamicBody
[{MaterialShading["Silver"],Sphere[{0.8,0,5.0},0.5]},"Restitution"->0.2],
DynamicBody
[{MaterialShading["Brass"],Sphere[{2.5,0,5.0},0.5]},"Restitution"->0.0],​​
;
Evolve the model for 300 steps with time step 1/60:
In[8]:=
frames=
PhysicsModelEvolve
[model,300,1.0/60.0];
Generate a video from the frames:
In[9]:=
PhysicsModelVideo
[frames,PlotRange->1.03{{-4,4},{-4,4},{-0.5,6}}]
Out[9]=
———————————————————————————————————————————————————————————————
Create a model with an avalanche of spheres:
In[10]:=
model=
CreatePhysicsModel

PhysicsBoundaryBox
[{{-5,-5,-10},{5,5,16}}],
FixedBody
[{Sphere[{0,0,-6},4]}],Flatten@Table
DynamicBody
[{Sphere[{i,j,k}+RandomReal[{-0.01,0.01},3],0.25]}],{i,-3,3},{j,-3,3},{k,0,14},


Out[10]=
PhysicsModelObject
Dynamic bodies: 735
Fixed bodies: 7
Time: 0.000
Data not saved. Save now

Evolve the model for 300 steps with time step 1/60:
In[11]:=
frames=
PhysicsModelEvolve
[model,300,1/60];
Generate a video from the frames:
In[12]:=
PhysicsModelVideo
[frames,PlotRange->1.05{{-7,7},{-7,7},{-10,2}}]
Out[12]=
Create a model with a dodecahedron rolling on an inclined plane:
Evolve the model for 300 steps with time step 1/60:
Generate a video from the frames:
Create a collection of "dominoes":
Create a ball that will push over the dominoes:
Create the model from the ball and dominoes:
Evolve the model for 300 steps with time step 1/60:
Generate a video from the frames:
Create a model with a large number of cones:
Evolve the model for 300 steps with time step 1/60:
Generate a video from the frames: