Lsystem_v2 Op
Lsystem generator
Summary (oneliner)
<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 'Axiom/Seed' 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 'step length' draw a line <code>f</code> Move forward by 'step length' without drawing a line <code>x</code> Rotate counter clockwise on the 'x axis' by the 'Default angle' amount <code>X</code> Rotate clockwise on the 'y axis' by the 'Default angle' amount <code>y</code> Rotate counter clockwise on the 'y axis' by the 'Default angle' amount <code>Y</code> Rotate clockwise on the 'y axis' by the 'Default angle' amount <code>z</code> Rotate counter clockwise on the 'z axis' by the 'Default angle' amount <code>Z</code> Rotate clockwise on the 'Z axis' by the 'Default angle' 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>></code> Multiply the line length by the 'Step scale Multiplier' <code><</code> Divide the line length by the 'Step scale Multiplier'</p> <p>Each rotation can also be assigned a different value than the 'Default Angle' 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'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>
- Ops.Extension.LSystem.Lsystem_v2
- Extension Op - Visible to all users
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
INPUT PORTS
<p>Trigger the op</p>
<i>integer</i>
)<p>Iteration amount, be careful with high numbers, the generated string is highly dependent on the Constants and Rules.</p>
<p>How far the current point moves when "F" or "f" is used</p>
<p>Used to multiply or divide the current 'step length' whenever ">" or "<" is used</p>
<p>The rotation amount that is used when a rotation amount isn't defined</p>
<p>Multiplies all default angles by this amount</p>
<p>Seed used for "Random Strength" amount</p>
<p>Amount of random offset applied to position and rotation of every point</p>
OUTPUT PORTS
<p>Used to trigger geometry</p>
<p>Used to trigger pointCloudArray or SimpleSpline</p>
<p>An array containing all the xyz data for every point</p>
<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>
<p>The final string used to create the Lsystem</p>