ArtiSynth Installation Guide for MacOS

7 Loading and Running Models

After ArtiSynth starts up, you can load and run demonstration models. Do this by selecting Models > Demos from the main menu and choosing a demo model (Figure 1).

Figure 1: The ArtiSynth model selection menu.

On older versions of MacOS, errors similar to the following may appear on the Eclipse Console output:

 2021-03-12 11:01:16.949 java[585:230b] invalid drawable

This is due to a problem in the default version of the Java-OpenGL (JOGL) interface. To fix it, go back to the terminal window, and from the ArtiSynth home directory run the command

 > bin/installJOGL2.3.2

Then recompile ArtiSynth.

Once a model is loaded, it will appear in the viewer, and simulation can be controlled using the “play” controls located at the upper right of the application window:

From left to right, these are: step size control, which controls the simulation step size (in seconds); current simulation time (in seconds); and the reset, skip-back, play/pause, single-step, skip-forward and stop-all buttons. Starting and stopping a simulation is done by clicking play/pause, while reset resets the simulation to time 0. The single-step button advances the simulation by one time step. The stop-all button will also stop the simulation, as well as any Jython commands or scripts that are running.

On newer versions of MacOS, another problem that may occur when trying to run ArtiSynth models is that MacOS may complain about using a nonvalidated external library. This will take the form of a console error that looks like this:

 ...
 /Users/lloyd/git/artisynth_core/lib/MacOS64/libPardisoJNI.11.1.2.1.dylib)
 not valid for use in process using Library Validation: library load disallowed
 by system policy
 ...

The problem here is that one or more of the native libraries are not “known” to Apple and are therefore not trusted. General information on working around this problem is described here:
support.apple.com/en-ca/HT202491
The short version is to immediately open your Security and Privacy settings after the error occurs, and then, near the bottom of the General tab, you should see a notification about the blocked application with a button to the right labeled Open Anyway. Clicking that button will grant the application a security exception.

Detailed information on how to use the ArtiSynth GUI for model visualization, navigation and simulation control is given in the ArtiSynth User Interface Guide.

Figure 2 shows ArtiSynth with the Spring Net demo loaded.

Figure 2: ArtiSynth with the Spring Net demo loaded.

7.1 Other ways to load models

It is possible to load models in several ways:

  • Using a model menu entry, as described above;

  • Specifying the Java class describing the model (“Load from class ...” from the Models menu);

  • Specifying a .art file containing a text representation of the model (“Load model ...” from the File menu);

  • Reloading a recently loaded model (“Load recent” from the Models menu).

It is also possible to configure ArtiSynth to load a specific model when it starts up; see “Loading, Simulating and Saving Models” in the ArtiSynth User Interface Guide. The model menu can also be customized, as described in “Customizing the Model Menu”.

7.2 Viewing and interacting with models

The ArtiSynth user interface provides a variety of tools for exploring and interacting with models, as described in depth in the ArtiSynth User Interface Guide, including:

  • 3D viewers with grids and clipping planes;

  • Component selection using either a viewer or a tree-based navigation panel;

  • Property inspection and editing for selected components;

  • 3D fixtures for translating, rotating and applying forces to models and their components;

  • A timeline for viewing and organizing input/output data streams known as probes;

  • Some simple model editing, including the ability to interactively delete components and add marker points;

  • Making movies from simulations.

7.3 Command line arguments

If you are running ArtiSynth from a terminal window (Section 5.2) then you can supply it with command line arguments to control different aspects of its behavior. A full list of these can be seen by running artisynth with the -help option:

 > artisynth -help

Descriptions of these options appear in various places within the ArtiSynth documentation. For example, one commonly used option is -model <modelClassName>, which instructs ArtiSynth to preload a model associated with a given class name:

 > artisynth -model artisynth.demos.mech.SpringMeshDemo

If you are running under Eclipse, command line arguments can be set in the launch configuration, as described in Section 13.4.