User Tools

Site Tools


02_user_tutorials:13_rgg

RGG coding

How to code in RGG.

RGG Code structure introduction

The RGG programming language repents the core of almost all GroIMP models. This language extends java and implements the XL-language specification (https://manual.grogra.de/XL/index.html), to enable rule based graph manipulation.

This leads to a programming language based on two paradigms, the object orientation of java and the rule based structure of XL. In order to separate these two rgg is using different brackets to define code blocks. The java blocks are framed by curly brackets {…} and the xl blocks by square brackets […]. These blocks can be embedded into each other recursively and share declared variables.

→ Read more...

XL turtle geometry and graph construction

This tutorial is only on the static construction of a 3D model and the underlying graph. There is nothing chaining and there are not steps involved. Therefor our base code structure only requires the init function:

protected void init ()
[
	Axiom ==> F;
]
The 3d view and the graph structure created by the init function above

This function is called every time you reset your model.(either with the rest button by recompiling/saving the code). The basic theory behind it is that the model always rests to the Axiom node and then runs the init function, if one is provided.

→ Read more...

02_user_tutorials/13_rgg.txt · Last modified: 2025/12/10 15:35 by gaetan