Explore Physics Concepts 
Through Dynamic
Pre-Lab Simulations 
Computer tool designed to prepare you for laboratory success.

1D Motion Simulation Example

This section showcases the general code template of simulations with 1D motion simulation as an example

Setup illustration
PreviousNext

Setup

Configure the MuJoCo rendering backend, import libraries for physics simulation, media recording, numerical computation, and data visualization.

Step 1 / 7
1%env MUJOCO_GL=egl
2from dm_control import mjcf
3import mediapy  # for video recording
4import numpy as np  # computations
5import seaborn as sns
6import matplotlib.pyplot as plt
7import matplotlib.ticker as ticker
*the demo simulation presented here is a modified version of 1D motion simulation.