Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Rigid body physics simulation and visualization for standard Wolfram Language 3D primitives
Contributed by: Arnoud Buzing
PhysicsModelLink provides a high-level interface for creating and simulating rigid body physics in the Wolfram Language. It lets you wrap standard 3D graphics primitives—such as spheres, cuboids, cylinders, cones, and capsules—as dynamic or fixed bodies, run time-stepped physics simulations with gravity and collisions, and visualize or animate the results as Graphics3D scenes.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["ArnoudBuzing/PhysicsModelLink"]
To load the code after installation, evaluate this code:
Needs["ArnoudBuzing`PhysicsModelLink`"]
Create a simple model with a falling ball and a fixed floor:
| In[1]:= | ![]() |
| Out[1]= | ![]() |
Plot the model in its initial state:
| In[2]:= |
| Out[2]= | ![]() |
Evolve the model for 300 steps with time step 1/60:
| In[3]:= |
Generate a video from the frames:
| In[4]:= |
| Out[4]= | ![]() |
Create a model with four balls with various levels of bounciness:
| In[5]:= | ![]() |
Evolve the model for 300 steps with time step 1/60:
| In[6]:= |
Generate a video from the frames:
| In[7]:= |
| Out[7]= | ![]() |
Create a model with an avalanche of spheres:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Evolve the model for 300 steps with time step 1/60:
| In[9]:= |
Generate a video from the frames:
| In[10]:= |
| Out[10]= | ![]() |
Create a model with a dodecahedron rolling on an inclined plane:
| In[11]:= | ![]() |
| Out[12]= | ![]() |
Evolve the model for 300 steps with time step 1/60:
| In[13]:= |
Generate a video from the frames:
| In[14]:= |
| Out[14]= | ![]() |
Create a collection of "dominoes":
| In[15]:= | ![]() |
Create a ball that will push over the dominoes:
| In[16]:= |
Create the model from the ball and dominoes:
| In[17]:= | ![]() |
Evolve the model for 300 steps with time step 1/60:
| In[18]:= |
Generate a video from the frames:
| In[19]:= |
| Out[19]= | ![]() |
Create a model with a large number of cones:
| In[20]:= | ![]() |
Evolve the model for 300 steps with time step 1/60:
| In[21]:= |
Generate a video from the frames:
| In[22]:= |
| Out[22]= | ![]() |
Wolfram Language Version 14.1