Gdesign 2.0 User Manual
Gdesign 2.0 User Manual
March 2008
GDesign 2.0
User Manual
1. Introduction
2. GDesign in a glance
3. Using LSystems with GDesign
4. Controls and Display
5. Files
6. Handling errors
1. Introduction
GDesign 2.0 is a 2D/3D free generative art application for Windows. With GDesign
you can interactively build, test, and edit complex 3D models using DOL, Stochastic
and Parametric LSystems, mixed up with some Cellular Automata tecniques. So
GDesign is a lab to experiment, explore and teach generative digital tools.
The goal of GDesign is not to build finished models, but to study and experiment
different formal solutions using generative grammars. These artworks can be
polished with other tools or just used as layouts.
This software was developed as my Computer Science master tesis at PUCP, Lima,
Peru. Much of the funtions and tools implemented into the software were suggested
by the classroom experience, infact I have been using many versions of GDesign in
my generative design classes at the Architecture Faculty of the San Martin de Porres
University located in Lima, Peru.
2. GDesign in a glance
2.1 The interface
F: Help; G: Save and Load grammars and subsystems; H: the Axiom tex tfield; I:
Rules and objects lists; L: Macro and Functions; M: Export options
Install: copy the GDesign folder into the c drive main directory. C:\GDesign
To begin, open the Grammar window, where you build your generative
grammars and assign 2D or 3D objects to your symbols.
Save the grammar, set the export options, then press Launch.
Choose iterations, object size, angle and decay. Default are 50, 5 and 30 degrees.
Choose standard or stocastic or context sensitive LSystems buttons in the Design
window.
Change viewports or parameters, or go back to the grammar window to edit your
LSystem.
To render your model, remember to check the .ms or .pov options, then load the
file in POVRay or 3DSMax (without exiting GDesign) and run the scripts.
Example1
Axiom=aP+b
a=a[T-b]
b=D+a+a
0. aP+b
1. a[T-b]P+D+a+a
2. a[T-b] [D+a+a] P+ a[T-b] a[T-b]
If you assign to a a red cube, and to b a blue sphere, then the parser will:
Draw a red cube, open a branch, then rotate along the Y axis and draw a blue
sphere, restart from the position before the branch, rotate along the X axis, draw
a red cube, rotate along the same axis, draw a red cube, restart from the position
befote the branch, rotate along the Z axis, draw a red cube etc.
In line 2 I mark each symbol with a color, so in line 2 you can see the matching substitution.
3.1 Symbols
a b c d e: Non terminal symbols, it means that they have a set of rules to
produce new symbols. Any legal symbol can be used in the rules.
F: Terminal symbol. Moves the turtle by an empty unit.
g: Non terminal. Always double itself g = gg.
i : Non terminal. i rule is interactive, you have to specify the production string
interactively in real time.
Numbers 0-6 are the iteration steps. Write a rule into each text field, or use the
same rule for all the iteration. Use the arrow to copy the first rule downward.
3.2.2 Stochastic rules
It is also possible to use stochastic rules, the parser will choose at random
between two rules for the actual iteration. Press the expand button to open the
stochastic rule palette. Press set rule to assign the rule to the actual symbol.
6
I think that context rules are useful to set rules for the last symbol of a branch,
or for roots. These rules also come in hand when working with subsystems, so
the growth process can react to special situations or objects.
can be nested, say the ineractive rule can incluye another i symbol. Be careful
though, because you could build a never ending system
This symbol lets you freeze another non terminal symbol, so you can
temporize the production of this symbol.
It will desappear authomatically alter 1 iteration.
Example:
Axiom: a=ab
a: bP+b
b: ab
0.
1.
2.
a=ab
abP+bab note the red a that doesnt change, = is destroyed
bP+babP+abbP+bab
now all the as are producing
Revers the movement direction, if you are going up, then you will go
down, if you go to the left, you will go to the right, etc.
This is a macro useful to set objects into position without using too many
F, X,Y,Z. Write in the textbox the string of movements you want, then
use the M symbol in your axioms or rules. This is very useful with
subsystems (see below).
R,S
These are random functions. You have to set how many random symbols
you want to generate, then choose which symbols will be included in the
random strings, then use R or S or both in your rules.
When the parser finds a R or S, it will expand the symbol into the given
random string. Note that for every R or S in the system the strings will be
different.
Example:
Axiom: a
a: bP+b
b: MRP+MS
M:XFY$F$F
R: a random string of 3 ab symbols
S: a random string of 5 abF symbols
0. a
1. bP+b
2. MRP+MSP+ MRP+S
R = aab S = baFbF
R = bab S = bFaba
3. XFY$F$FaabP+XFY$F$F baFbFP+XFY$F$FbabaP+bFaba
fig. 7) The text fields in the grammar window to set M R S strings. Pulse TRY to preview the
strings.
3.5 Subsystems
Subsytems are LSystems that can be embedded into other systems. There is one
limit working with subsystems: you cant use rotations, macros and functions.
But you can move freely in the X Y Z directions, increase or decrease size,
assign 2D or 3D objects and use branches. Subsystems are Terminal symbols,
but you can weld a subsystem to any other non terminal symbol that will work
like dummy objects.
You can build very complex objects made of subsystems and standard objects
together. The best thing about subsystem is that you can change interactively the
size of every subsystem and the size of the main system, so you can draw a lot of
interesting effects in real time.
It is difficult to align a standard object to a subsystem, because this object will
stick to the last object of the subsystem. So you have to design your subsystem
carefully and take care of alignments, ore use the M macro.
To use subsystems, do the following:
3.6 Options
In the option window you can set some general preferences:
10
11
fig. 11) Load Bitmap and set the ZBuffer option in the Option palette
12
Actually only the Z buffer and the color options are supported.
To use a bitmap, load .tga image using the File option of the main men, then in
the grammar window open the Options palette and validate the ZBuffer/size
affect option. Adjust the postition and size of the objects to match the bitmap
values.
To assign the size value to the main system, press the LS button, to assign size to
A subsystem, press the A button, etc. Only size Works with subsystems, the
angle option will be implemented as soon as possible.
4.2 Display
Here you can set the view to display the system: front (Z), right (X), top (Y).
Press P for the prospectic mode, A for the parallel mode.
To move the camera near or far, change the viewpoint with the slider control.
13
Center moves the origin of the system in the center of the canvas window. You
can adjust the position pressing the icons on the border of the canvas window.
If you want to display the axis oif the objects, press Axis On
5. Files
Grammars and subsystems are saved as ASCII files, grammars with the extensin
.cad and subsystems .sub.
Scripts also are ASCII files, like .ms script file for 3DSMax and .pov for POVRay.
Bitmaps are parsed only in Standard Truevision .TGA 24 bit file format.
Soon will be implemented the possibility to export files in . STL Stereolitho file
format, to interface with rapad prototyping machines or 3D printers.
6. Handling errors
GDesign is working OK, but some errors or unespected behaviors can occur because
of sintactic error or illegal operations (the parser only sometimes advises the user of
these exceptions). Here is a list of common mistakes that may cause problems (but
GDesign will not crash, it just does not perform as you are expecting). So:
1) Avoid rules with too many symbols, this will generate a very big system, may be
the system could go out of memory.
2) Do not use rotations, macro and functions in grammars that you want to use as
subsystem.
3) Always specify the rotation axis with the first rotation, if not, the parser will
ignore every angle modification. For example:
aaaP+bbb-a the symbol + and - will be correctly parsed
aaa+bbb-a the symbols + - will be ignored and all the following rotate
modificators until a P or T or D is found.
4) If nothing is displayed, check if objects have been assigned to symbols
5) Remember to close your brackets. A [ must be closed with a ]
6) Remember to link a file when using subsystems symbols A B C D E. If you
dont link a file to these symbols, nothing will be displayed.
And finally:
Generative production can be very difficult to predict, sometimes GDesign seems to
do strange things, but this depends on the complexity of grammar design.
Do not get frustrated, build your grammars step by step, it is very useful to draw by
hand the basic idea of the structure you want, and then experiment with the
possibilitiess of the generative process.
14
But this is precisely the idea: to study natural system and simulate them with
LSystems. New things can be discovered this way, this is better than playing
randomly with symbols and rules. Creativity must be carefully planned.
And the great italian painter Giorgio Morandi used to say:
Amo la regola che corregge lemozione
I love the rule that adjusts the emotions
I apologize for my english.
Umberto Roncoroni
March, 2008
15