Some time ago I became excited by the potential of the Lindenmayer rewriting system for pattern generation in nodeEditor.
The wikipedia page offers a decent explanation: https://en.wikipedia.org/wiki/L-system
Initially I was thinking of a pair of nodes: a) universal rewriter & b) a interpreter/turtle node. This is the common approach and the one that Grasshopper has taken. However, I realised that the lack of facility for handling string data would render this method impractical, and so shelved the idea.
The images above are all examples of patterns generated with this online tool, and could potentially be generated in NE with parametric control.
The page is rich in javascript, including one linked files called "l-system-generator.js" which I wonder if it may present a template for
the authoring of a NE node following a similar approach. Many of the options on the webpage would not be needed in the node.
Below I have shown a proposal for a L-System Node. It need only have inputs for the Starting point, the number of generations, the line length for branches, the branch angle and scaling factor of line length of branches of each generation. For the 6 patterns shown above the "Scale/Gen" value would be 1, but botanical structure such shown below would have a decimal value < 1 (eg 0.3).
All of the grammatical formulation would be located in the info panel. I have included outputs as lines and as well as points because each has advantages.
I know that this would likely be a major undertaking, but if there are any biters, I do believe it was be an amazing contribution to NE.
Thank you for the link. I download & voraciously devoured its content.
Moreover I have returned it again & again...Lindenmayer's insight was extraordinary:
that a simple set of instructions applied recursively would generate limitless patterns and forms, but further that a subset of these would be facsimiles of forms found in nature. Though for me at least, it is the novel pattern generation that is most exciting, particularly those that possess aperiodicity like the explorations of Roger Penrose.
and my little prog online! ;)
Drag & Drop any png image with a transparent background...(better 1024* 512 )
(An JPG image will made a neutral result ) https://editor.p5js.org/Pilou/full/y1GHaBqyT
This is what I have so far on my alpha version of L-System for the Node Editor. Still working on the interface. All the l-system samples are working so far.
This is what I have so far on my alpha version of L-System for the Node Editor
It is looking great...very exciting.
I see that you are closely following the approach of onlinemathtools.com/l-system-generator, including its input values of width & height. I purposely excluded these from my node proposal because the consequent distortion of the output would generally be undesirable. The spatial limitation of displaying within the webpage necessitates the inclusion of these (w,h) input values. The virtual 3d space has no such limitation, besides any requirement for scaling and proportioning may be achieved subsequently with Objects2/ScaleUVW node.
quote:
Still working on the interface.
I understand that you are at beta stage and the interface considerations are far from fixed (and you have likely had the same thought) , but the inclusion on the node of inputs for angle and iterations would give greater dynamic control of output.
I also know that there is no scaling factor per generation included in the js code of the online tool, but if this facility was possible it would push the capabilities into a realm beyond; opening up a new world of possibility....worthy of consideration!
Again, thank you for your hard work with this. I can't wait to get my hands on it.
Keep up the good work,
James https://www.instagram.com/nodeology/
The Gate node is one of my meagre contributions to node library from a few years back. http://moi3d.com/forum/lmessages.php?webtag=MOI&msg=7777.1251
At the time I thought these would be a real boon to NE's capabilities; after-all digital computation
is based on logic gates.
Instead it languished; all but ignored (even by me).
When we lost John Conway to covid, I attempted to build a cellular automaton circuit
for his "Game of Life" in NE, however never managed to get it to work.
No, if you reread my post, it was in response to your post about the logic gate node, not L-Systems.
Cellular Automaton replies on conditional logic to test each cell's adjacent neighbours at each iteration to operate,
so it should be possible to build in NE with the use of logic nodes.
You have an another cellular Automate with a very simple rule!
Turmites : If it's Black turn on the right!
if it's white turn on the left!
Amazing that after some repetition a striah line apaers from the chaos! :)
PS There is no .nod file for the Lsystem ? Only a js file ?
Edit : ok Found! :) Just put the JS file inside the folder (for PC) ...\Moi\nodeeditor\nodes\extensions\lsystem.js
Will be in the Node / Objects2 if i am right...
Insert 3 nodes "sliders" a an "OutPut" et voilĂ !