CGA features overview

This section is about CGA Features and covers typical constructs, CGA syntax and handy features. CGA Operations are covered in Shape operations overview.

Rule with parameters

Pass multiple strings, numbers or boolean values from a rule to its successors.

Conditional rule

Call different successor rules based on conditions.

Stochastic rule

Call different successor rules at random. The likelihood of each successor t can be controlled by percentages.

CGA attributes

Global variables to store values that are used in multiple rules or to make them editable in the Inspector.

CGA styles

A style is a specific combination of values for a set of attributes. You can switch between styles in the Inspector.

CGA functions

Encapsulate code so that it can be used by multiple rules. Helps to avoid duplicated code.

Rule file import

Import rule files to get access to all of its rules, functions, and attributes.

Comments

Make your code easier to understand for your peer programmers (or yourself in the future).