Lsystem_v2 Op

Lsystem

Lsystem generator


<p>Basic Lsystem explanation: An LSystem is a parallel string rewriting system. A string rewriting system consists of an initial string, called the seed, and a set of rules for specifying how the symbols in a string are rewritten as (replaced by) strings.</p> <p>seed: A rules: Rule #1: A = AB Rule #2: B = BA</p> <p>The LSystem starts with the seed ‘A’ and iteratively rewrites that string using the production rules. On each iteration a new string/word is derived. n is the derivation length = the number of iterations</p> <p>n=0: A n=1: AB (A becomes AB according to Rule #1) n=2: ABBA (A becomes AB according to Rule #1, while B becomes BA according to Rule #2. In result we get ABBA) n=3: ABBABAAB n=4: ABBABAABBAABABBA</p> <p>All Lsystems need to have a &#39;Axiom/Seed&#39; and at least 1 constant with 1 rule</p> <p>The final string is then used to create a series of steps, rotations and scaling to geometry or a set of xyz points.</p> <p>This op can be used with any geometry ops or with the pointCloud op and various spline ops.</p> <h4>Guide to symbols:</h4> <p><code>F</code> Move forward by &#39;step length&#39; draw a line <code>f</code> Move forward by &#39;step length&#39; without drawing a line <code>x</code> Rotate counter clockwise on the &#39;x axis&#39; by the &#39;Default angle&#39; amount <code>X</code> Rotate clockwise on the &#39;y axis&#39; by the &#39;Default angle&#39; amount <code>y</code> Rotate counter clockwise on the &#39;y axis&#39; by the &#39;Default angle&#39; amount <code>Y</code> Rotate clockwise on the &#39;y axis&#39; by the &#39;Default angle&#39; amount <code>z</code> Rotate counter clockwise on the &#39;z axis&#39; by the &#39;Default angle&#39; amount <code>Z</code> Rotate clockwise on the &#39;Z axis&#39; by the &#39;Default angle&#39; amount <code>[</code> Push current position and rotation onto the stack (Starts a branch) <code>]</code> Pop current position and rotation from the stack (Closes a branch) <code>&gt;</code> Multiply the line length by the &#39;Step scale Multiplier&#39; <code>&lt;</code> Divide the line length by the &#39;Step scale Multiplier&#39;</p> <p>Each rotation can also be assigned a different value than the &#39;Default Angle&#39; by typing in the axis and then a number.</p> <p><code>x34.5</code> Will rotate -34.5 degrees on the x axis</p> <p>User defined angles and default angles can be mixed together like this <code>FFx34.5FyzFx20.2</code></p> <p>To create 2 branches: <code>FF[xFFyzF]F[yxFFyzF]</code></p> <p>To nest one branch inside another: <code>FF [xFF [YzFF] fF ]</code></p> <p>All branches must be closed to generate a valid string. [FFxF] / this will work [FFXF / this won&#39;t due to the missing close branch symbol</p> <p>Check <a href="http://paulbourke.net/fractals/lsys/">http://paulbourke.net/fractals/lsys/</a> for Rule sets and examples</p>


Full Name
  • Ops.Extension.LSystem.Lsystem_v2
Visibility
  •  Extension Op - Visible to all users
License
  • MIT
AuthorgithubMaintained by Team


Example Patch Lsystem cyber 01

Open In Editor

Youtube Video Tutorial

INPUT PORTS


Trigger (Trigger)

<p>Trigger the op</p>

Iterations (Number:

<i>integer</i>

)

<p>Iteration amount, be careful with high numbers, the generated string is highly dependent on the Constants and Rules.</p>

Step length (Number)

<p>How far the current point moves when &quot;F&quot; or &quot;f&quot; is used</p>

Step scale multiplier (Number)

<p>Used to multiply or divide the current &#39;step length&#39; whenever &quot;&gt;&quot; or &quot;&lt;&quot; is used</p>

Default angle (Number)

<p>The rotation amount that is used when a rotation amount isn&#39;t defined</p>

Rotation multiplier (Number)

<p>Multiplies all default angles by this amount</p>

random seed (Number)

<p>Seed used for &quot;Random Strength&quot; amount</p>

random strength (Number)

<p>Amount of random offset applied to position and rotation of every point</p>

OUTPUT PORTS


Out trigger geometry (Trigger)

<p>Used to trigger geometry</p>

Line/point trigger (Trigger)

<p>Used to trigger pointCloudArray or SimpleSpline</p>

Points out (Array)

<p>An array containing all the xyz data for every point</p>

Max Size (Number)

<p>The largest distance from the starting point, can be used to make sure that the generated Lsystem is always within a bounding box. Check example file to see how this works.</p>

Final generated string (String)

<p>The final string used to create the Lsystem</p>


Patches using Lsystem_v2

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarandro - 2019-10-02 16:33
Ops.Exp.Lsystem_v2 renamed to Ops.Systems.Lsystem_v2user avatarpandur - 2019-10-15 10:27
renameOps.Systems.Lsystem_v2 renamed to Ops.Extension.LSystem.Lsystem_v2user avatarpandur - 2023-12-06 09:19