Skip to content
gadfly edited this page Nov 6, 2016 · 5 revisions

L-System SOP notes

Introduction

This is a consize documentation for the L-System SOP tool. Information is assembled from the official documentation, and from information gathered during usage. Currently it's not complete since it concentrates on restructuring the available information for enhanced usability and on providing the information missing from the original documentation.

Stages

Synopsys

[left_context<] symbol [>right_context] [:condition] = replacement [:probability]

symbol: Name of the rule to replace. It can be a predefined turtle function.

replacement: String of symbols.

probability: Floating point number between 0 and 1. Not an expression, since it gets evaluated during the rewriting stage.

Brotips

Spaces are meaningless. You may want to use them to make your rules more readable.

Resulting L-System string is in the node info. Use middle mouse buton on node. Use only one generation to avoid going crazy.

Use an external editor. In the long run editing a text file is easier than using the node's interface.

Use # for comments. In the rule text file of course.

Between ()s you are in expression land. None of the turtle commands and rewriting rules apply.

Omitting ()s of turtle functions makes function use the default values. They remain function calls though.

An empty replacement deletes the symbol.

Turtle functions

  • F() - move forward, connected
  • f() - move forward unconnected
  • T() - tropism

Expressions

Operators

  • +, -, *, /

Functions

  • rand()
  • in()

Predefined variables