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Ă !
You are right.
search didn't work because of extra whitespaces .
LGraphCanvas.prototype.renderInfo = function (ctx, x, y)
LGraphCanvas.prototype.renderInfo = function( ctx, x, y )
Now I find it. :)
I usually prefer to have different versions of same node, But I gave it a try.
I added your modification as you showed, but couldn't see any difference.("save as" window pops up with empty name field)
Anyways, I change your code a bit.
Now if you press the save button and alt key , it saves on existing node file without confirmation.
otherwise works like before.
code:
Editor.prototype.onSaveButton = function (e)
{
if (this.graph.blocked) return;
var saveFilePath="";
// var saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..', lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );
// if (e.altKey) {saveFilePath = moi.filesystem.getSaveFileName(lang.getTranslation('Save as') + '..', lang.getTranslation('MoI Nodeeditor files') + ' (*.nod)|*.nod',lang.getTranslation(this.graph.filename));}
if (e.altKey) {saveFilePath = lang.getTranslation(this.graph.filename);}
else {saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..', lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );}
if ( !saveFilePath ) return false;
if ( this.graph.status !== LGraph.STATUS_STOPPED ) this.onPlayButton();
var file = moi.filesystem.openFileStream( saveFilePath, 'w' );
file.writeLine(LiteGraph.JSONprettify(this.graph.serialize(), {"indent":" ", 'maxLength':150}));
file.close();
this.graph.filename = saveFilePath;
this.graph.setDirtyCanvas(true,true);
}