WOLFRAM

Simulation Center3D Animation

NavigationStoring Animations and Cameras
Attach CameraAnimation Properties
Trace Path

If the current experiment uses any components from the MultiBody library that have a visual representation, it is possible to view a 3D animation of the model as shown in the screenshot following. To view the animation, choose View Animation; this will open the Animation view in a separate window. Previously opened Animation views can be accessed from the Window menu.

To start the animation, click the play button in the toolbar within the Animation view. When the animation is running, it is possible to pause it by clicking the Pause button or stop it by clicking the Stop button. It is also possible to change the time scale of the animation by selecting the desired time scale from the time scale combo box or by entering a custom time scale and pressing the Return key. To show the Animation view in full screen, right-click and select Full Screen.

By default, the ground plane, as defined by the gravity direction in the World instance, is visualized with a grid that is adaptive to the current view point. The grid can be disabled by clicking the grid icon in the animation window toolbar.

If the animation window is open while a real-time simulation is running, the toolbar will be disabled and the animation will run synchronized with the real-time simulation.

1.gif

Animation view of Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.

Navigation

It is possible to rotate, pan and zoom in/out of the 3D model by using the mouse. To rotate the 3D model, click and hold the left mouse button and drag the mouse in the desired rotation direction. To pan the 3D model, press and hold down the Ctrl key. Then click and hold the left mouse button and drag the mouse in the desired pan direction. To zoom in or out, rotate the mouse scroll wheel backward or forward. To reset the camera position and fit the 3D model to the window, double-click in the window or right-click and select Fit to Window.

It is possible to select objects in the Animation view by clicking them; the selected object will be indicated by making all other objects slightly transparent. At the same time, the corresponding component will be selected in the Plot view.

Attach Camera

It is possible to attach the camera to a specific object by right-clicking and selecting Attach Camera to. The camera will then maintain its relative position to that object when the object moves. How the camera maintains its position is determined by the Camera Follow Mode, which can be changed by right-clicking and selecting Camera Follow Mode. There are three different modes to choose from:

Trace Path

To trace the path of an animation object, right-click in the Animation view, select Trace Path and select the desired animation object. This will visualize the path of the selected animation object with a tracing line, as seen in the following screenshot. To remove a trace, right-click in the Animation view, select Trace Path and select the desired animation object or alternatively, select Clear All to remove all traces.

2.gif

Path trace of the two load objects in Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.

Storing Animations and Cameras

To easily reproduce the same animation from a future simulation, the animation and camera configuration can be stored in the model. To store the current camera configuration, right-click the animation and choose Add Camera to Model; this will store the following:

Animation Properties

To change the properties of an animation, right-click somewhere in the animation window and choose Properties. This will open the Animation Properties dialog.

4.gif

In the Animation Properties dialog, the available elements depend on if the model is writable or not and if it is using any MultiBody visualizers for visualizing vector quantities.

Vector Quantity Visualizers

The Vector Quantity Visualizers section is only present if the model uses any MultiBody visualizer for visualizing vector quantities from Modelica Standard Library Version 4.0 or later. By default, these visualizers are automatically scaled in relation to the size of the entire animation scene. If that does not produce the desired result, it is possible to specify a manual scale for each quantity. The scale is expressed as the number of meters per amount of quantity in the unit used for modeling the quantity, e.g. for a force that would usually be m/N. By default, the diameter of the visualization vectors is automatically chosen in relation to the largest vector of that quantity. It is also possible to manually specify a diameter per quantity as well as a default diameter used by all quantities that do not have a manually specified diameter.

Click OK in the dialog to close the dialog and apply the new properties or Add to Model/Update in Model to also store them in the model as an annotation.