# Graph

A graph is a set of interconnected nodes that are used to generate output values based on the values of a given set of inputs.

Plant Factory makes use of two types of graph :

- vegetation graph that describes the plant structure
- material graph

## Input and Output Nodes

The graph inputs sit on the left of the graph. The graph outputs are placed on the right of the graph. Input nodes are the points where data enters the graph, and output nodes the points where the data exits the graph. Output nodes represent the value that is computed by the function.

Data enters the graph at the input nodes, flows down through the different nodes and links in the graph, and exits at the output node. You cannot place other nodes at the left of the input nodes or at the right of the output nodes.

## Vegetation Graph

In Plant Factory, the main graph may contain vegetation nodes in addition to the standard nodes. Those nodes are being evaluated starting from the Plant root on the left and following the links. Evaluating vegetation nodes causes geometry to be build.

Unless for vegetation components, there is no output to this graph, since its purpose is not to yield a result value but to generate the plant structure.