nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.25k stars 233 forks source link

REcursion between nodes #242

Closed nortikin closed 10 years ago

nortikin commented 10 years ago

no-recursion Invalid node tree! it writes to me

how we can avoid it?

zeffii commented 10 years ago

i'm not sure if Recursion is possible in pynodes, but I recall reading that Atom had some recursive nodes in BlendGraph -- didn't look at it.

Seems recursion is quite tricky, as you need a terminating condition somehow

ly29 commented 10 years ago

Well recursion is possible but really hard to resolve with mode of execution we have. If you connect the output of the template to some other node what will the value of that be? Which one of the recursions will it be get evaluated. recursion Obviously things like above shouldn't work since it and infinite loop. recursion2 Perhaps something like above should work.

Right now sverchok "compiles" into a simple list of nodes. example This becomes this list which resolves a safe order to evaluate the nodes ['Integer.004', 'Integer.003', 'function.002', 'Debug print'], where each node only has to be resolved once, but the nature of recursion and reusing of outputs using noodles make recursion hard for me get my head around. If we allow recursion we have either run through the recursion or disallow any connections from the recursion group I think. We have to rethink how Sverchok works in either case.

nortikin commented 10 years ago

the issues is fractal node that i prepare, and Alex said that he can make genetic algorythm or something like that, i don't know how he deal with recursions. so, for now we have to conservate recursiona in local nodes, restrictions are there. will ask in IRC

zeffii commented 10 years ago

An L system? like Lindenmayer? http://www.biologie.uni-hamburg.de/b-online/e28_3/lsys.html I am interested in this sutff.

ly29 commented 10 years ago

It isn't impossible at all, it just that we have to make Sverchok into a more proper programming language, and it is tricky. Note that isn't a blender issue at all, it something we created on our own. We "just" have make our own compiler that compile the nodes into something that can be executed in proper order, right now it is simple (but not stupid) which gives a simple list.

Also pynodes doesn't like but doesn't really matter for us. pynodes

Pynodes are in cycles for example means something completely opposite of what they do in sverchok, they could mean anything.

nortikin commented 10 years ago

yeah. i not understand what aim of Lukas Tone framework. what framewark is made for? if there will be possibility to recursions etc, than we can wait... but we making now framework in framework in blender...

zeffii commented 10 years ago

http://www.ted.com/talks/michael_hansmeyer_building_unimaginable_shapes (recursion in architecture using subdivisions)

ly29 commented 10 years ago

Just to clarify about wifi nodes. Right now wifi nodes are resolved as noodle links that are created from the var names within the node group. They are considered as real other noodles by the update system. I am happy if there is some other way to view them in manageable way.

https://github.com/nortikin/sverchok/blob/refactor/sverchok/data_structure.py#L744-L767

enzyme69 commented 10 years ago

We will build them. Them, unthinkable shapes.


enzyme69 commented 10 years ago

Video inspiration: http://vimeo.com/98435385

ly29 commented 10 years ago

As seen in #184 the need for making this possible is also becoming more important.