Running your first RGG model
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 21 or higher installed on your computer. If not you can find the oracle version here. It is possible to have several java version on your device, please make shure that GroIMP uses the right one.
Additional information can be found in the user guide: Installing GroIMP
After installing GroIMP using a installer, a desktop short cut is provided that start the GUI, for more information and trouble shoots see Running GroIMP
Look around
On the first window even so it is empty we can already find some important parts of the software. Especially for finding help and getting started.
New creates a new GroIMP project from one of the templates, we are going to use this in the next step
Open allows you to open GroIMP projects, they are stored either as gsz or gs file.
Example projects provides you with a collection of embedded example projects that try to highlight the most important features of the software. Even more examples can be found online in our
gallery.
The RGG Tutorial is an embedded tutorial that gives an interactive introduction to the XL/RGG syntax
Help opens the embedded documentation, of all the installed plugins.
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.
This part of the menu points to several helpful webpages that provide different information:
The
API Documentation provides the javadoc of GroIMP, this seems very confusing on the first look but if you get deeper into modelling with GroIMP it can be very helpful to know what each class can do and how they are related to each other
-
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.
-
With the
Plugin Manager it is possible to install remove and update plugins (parts of the software) This is documented
here
New RGG
Now to get an first impression of modelling in GroIMP we are opening our first RGG project. Todo so go in the menu 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:
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 want 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).
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 an the camera and to render the view with different renderers. Additionally in the menu under View /export it is possible to 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
A GroIMP model is coded in the RGG programming language and this code is stored in files. To manage this files the File Explorer is used, here you can add, create and delete file and folder. To create a file you have to add a not 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.
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.
If you for example would miss-type setShader(BLUH) you could see a error message in the messages Panel. This panel will give you information about most events and issues in your project.
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.
The Attribute editor can be used to manipulate the currently selected objects, this includes the nodes and the meta objects. If you for instance select the little sphere and change the field Radius and press enter the selected sphere is changing the diameter. But of you click reset on the RGG toolbar(1) the sphere (actually a new version of it) is back to the original size.
Finally the XL-Console is used to run RGG commands on the model without recompiling, 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.
Additional panels
Beside the panels opened directly in the beginning there are several others that can help you at time, here only two that may get you started:
/Panels/2D/Graph : provides you a visual representation of your simulation graph. This is very helpful to understand the theoretical background of GroIMP. Also it allows you to select nodes that are not visible.
/Help/Function Browser : can help you to identify or find functions used in RGG, this can help you especially in the beginning to understand models of other users.
Saving
To save your project, you can either press the save button in the RGG toolbar or go on 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 the gsz which creates just one archive of all the files and save it. This can than be moved and shared. The gs option saves the same files just not compressed, this means the project is a whole folder.