Table of Contents

Difficulty
Very easy

Running your first Model

This tutorial start from nothing and installs GroIMP and has a look around the Window and the first simulation to get an Idea what all the buttons do.

Installation

GroIMP is a Java-based application that supports Windows, Mac and Linux. Installation files can be found here.

Before installing GroIMP, please make sure that you have Java 17 or higher installed on your computer. If not you can find the oracle version here. It is possible to have several Java versions on your device, please make sure that GroIMP uses the right one.

Additional information can be found in the user guide: Installing GroIMP After installing GroIMP using an installer, a desktop shortcut is provided that starts the GUI, for more information and troubleshooting see Running GroIMP

Look around

On the first window, even though it is empty we can already find some important parts of the software, especially for finding help and getting started.

  1. New creates a new GroIMP project from one of the templates - we are going to use this in the next step
  2. Open allows you to open GroIMP projects. These are stored either as gsz or gs files.
  3. Example projects provides you with a collection of embedded example projects that try to highlight the most important features of the software. More examples can be found online in our gallery.
  4. The RGG Tutorial is an embedded tutorial that gives an interactive introduction to the XL/RGG syntax
  5. Help opens the embedded documentation of all the installed plugins.
  6. Under Preferences most GroIMP features can be customized, from rendering, over the number of buttons on a toolbar, to the ports of the embedded servers. This is documented here.
  7. This part of the menu points to several helpful webpages that provide various information:
    1. The API Documentation provides the javadoc of GroIMP: Though very confusing at first glance, but potentially very helpful once you dive deeper into modelling with GroIMP because it allows you to know what each class can do and how classes are related to each other
    2. Grogra.de is the main page of our project
    3. GroIMP wiki The GroIMP wiki (you are on it right now) is a collection of tutorials and descriptions of the different parts of the software.
    4. The GroIMP youtube channel can give you some inspiration of what to do with GroIMP (and what others already produced with it)
  8. With the Plugin Manager it is possible to install, remove and update plugins (parts of the software) This is documented here

New RGG

Firts of al, to get a first impression of modelling in GroIMP, let's open our first RGG project. To do so, go to the menu, click on New (the 1 in the image above) and select “RGG Project”. This will provide you with the following window:

Lets have a short look around:

  1. The RGG toolbar provides a button for each public function in the RGG code (the code can be seen in the code editor(4)) if you wish you can click on run and see the changes in the 3D view. Additionally, it comes with a reset button, which brings the simulation back to the starting point (defined in the init function).
  2. The 3D view shows the current state of the model. It is possible to navigate through the model using either mouse control or the navigation button on the top right. With the menu it is possible to customize the view and the camera and to render the view with different renderers. Additionally, in the menu under View /export you can export the 3d scene in several formats. The 3D view is also used to select and edit objects in the scene as shown on the right. If selected the attribute editor (7) is opened.
  3. A GroIMP model is coded in the RGG programming language, and the code is stored in files with the extension rgg. To manage the files the File Explorer is used, here you can add, create and delete files and folders. To create a file you have to add a not yet existing file. If you select a file it is opened in the code editor (4) you can try this with the parameters.rgg file in the folder param.
  4. GroIMP includes the code editor JEdit to edit the source files of the simulation. If not changed in the preferences, pressing Ctrl-s will save the code and recompile and reset your simulation. Try this by changing setShader(GREEN) to setShader(BLUE) in the file Model.rgg and save. This should turn our little sphere blue.
  5. If, for example, you mis-type setShader(BLUH) (instead of BLUE) you will see an error message in the messages panel. This panel will give you information about most events and issues in your project.
  6. Each file you create in your model is compiled and added to the Meta Objects explorer. If you select one here it opens the attribute editor (7) for the model.
  7. The Attribute editor can be used to manipulate the currently selected objects. This includes the nodes and the meta objects. If, for instance, you select the little sphere, change the field Radius and press enter the selected sphere is changing the diameter. However, if you click reset on the RGG toolbar(1) the sphere (actually a new version of it) returns to its original size (since the init() method has now been executed).
  8. Finally, the XL-Console is used to run RGG commands on the model without recompiling it, which can be helpful for analyzing or manipulating the model during a simulation. Try to type ((*Model.A*)), that will list you all A's in your simulation. If you press the run button in the RGG toolbar(1) and run the command in the console again there will be more output. On the right you can see a history of the last commands you used. Why can't we simply write ((*A*))? Try it, and you will see an error message. In fact, the XL console is outside of the Model (which is an RGG class), so we need to tell GroIMP that we want to access the module A that only exists in Model.rgg.

Additional panels

Beside the panels opened directly in the beginning there are several others that can help you at times. Here are two panels that may get you started:

Saving

To save your project, you can either press the save button in the RGG toolbar or go to File/Save. This provides you with a file dialog where you can select a location to save. The possible file types are .gs and .gsz. The simplest to use is gsz, which creates just one archive of all the files and saves it. This can then be moved and shared. The gs option saves the same files, but they will not be compressed, which means the project is a whole folder.