Repeat
Defines a looping block in the graph. Encapsulates a subgraph between Repeat Begin and Repeat End, re-evaluating it N times with time-varying attributes.
The Repeat concept is implemented as a pair of nodes, Repeat Begin and Repeat End. Any graph logic placed between them is encapsulated and executed N times, with attributes like u and repeat_index updating each iteration so the subgraph can evolve (getting smaller, rotating, or changing probability). While Grow has a built-in repeat for convenience, the explicit block can wrap multiple nodes (Grows, Splits, Switches) to repeat an entire logic chain.
Inputs
| Input | Description |
|---|---|
| Repeat Begin, Input 0 | Incoming graph. |
| Repeat End, Input 0 | The subgraph to repeat. |
Outputs
| Output | Description |
|---|---|
| Output: Graph | The repeated subgraph. |
Intrinsics
| Attribute | Description |
|---|---|
u | Normalised loop index 0..1. Updates every iteration. |
repeat_index | Integer counter for the current iteration. |
Parameters
| Parameter | Description |
|---|---|
| Repeat Count | The number of times to execute the subgraph (set on the End node, which also defines the exit condition). |
| Fraction | A multiplier for the count, allowing partial iterations (growing 3.5 steps, say). Fraction = 1.0: full execution. Fraction < 1.0: limits the realised steps, useful for animating growth. |
| Delay | Offsets the start of the repetition, useful for staggering growth across different branches. |
Notes
- Use the
uattribute inside the subgraph to drive parameters (mapWidthtouso repeated segments taper, say). - Wrap Splits and Switches inside a Repeat to build fractal or recursive structures.
See also: Simulation concept · Grow · Split · Switch