Repeat

Wrapper node for iterative growth. Encapsulates a subgraph and repeats it N times, generating the normalized index `u` and supporting delayed or fractional iterations.

Repeat

The Repeat wrapper executes its input subgraph multiple times,
generating loops that control growth, branching, or decoration.

Unlike the low-level repeat_core, this wrapper introduces begin/end blocks,
a friendlier interface, and direct integration with mappings and sockets.


Concept

  • Encapsulates a subgraph between Repeat Begin and Repeat End.
  • Iterates the subgraph N times (repeat_count).
  • Exposes the normalized loop index u [0..1], which is critical for mapping.
  • Supports fractional iteration via fraction, allowing partial loops.

This is how long stems, stacked segments, or layered patterns are built in Natsura.


Inputs

Input 0 — Graph
The incoming Apex graph.

Subgraph (Begin → End)
Nodes placed between Repeat Begin and Repeat End are executed iteratively.

Output — Graph
The modified graph with repeated internodes, ready for downstream growth or Simulate.


Parameters

  • Repeat Count (repeat_count)
    Number of iterations. Each iteration appends new internodes to the graph.
  • Fraction (fraction)
    Optional multiplier. Realized steps = floor(fraction × repeat_count).
  • Delay (optional, advanced)
    Used for staggered iteration across multiple branches.

Attributes

Repeat introduces or modifies:

  • u – normalized loop index, resets each Repeat.
  • repeat_index – integer iteration counter.
  • Any attributes created in the subgraph are evaluated per iteration.

Workflow

  1. Drop a Repeat Begin node.
  2. Add one or more nodes (e.g. Grow) inside the block.
  3. Close with Repeat End.
  4. Adjust repeat_count and map u to control per-step variation.

How-tos

Simple segmented stem

  • Place a Grow node inside Repeat.
  • Set repeat_count = 5.
  • Map u to taper width along the iterations.

Fractional growth

  • Same as above, but animate fraction from 0 → 1.
  • The stem appears to “grow” step by step.

See also

  • Grow – often used inside Repeat
  • Split – forking branches alongside iteration
  • Switch – state-based iteration control
  • Repeat Core – the underlying primitive