algorithmic modeling for Rhino
well, I finally managed to get a leaf venation script going in Hoopsnake. Unfortunately, the end result is flattened and had no information on the several groups of growth processes anymore.
What I intend to do is like in the example video by Nervous System http://vimeo.com/18068618
So I would like to create the thickness for the branches. Longer branches are thicker, starting from a growth point.
So far, I have not managed to find a good way to:
a) Group the curves into 4 groups, belonging to each growth point
b) Join the curves in a way that makes sense with branch lengths?
When I just do 'Join curves', the whole thing -of course- ends up as quite a mess...
You would probably be much better off trying to manage the data structure such that each new branch generated in hoopsnake created a new path. It's tricky to do...we've been working with the same algorithm nervous system referenced in their work and have executed it almost entirely through a vb script component in order to maintain order for this very reason...but worth it in the end, although I'm not sure that you'll be able to avoid doing some scripting to achieve what you're looking for...
yes, of course I would prefer doing that. So far, unfortunately, I have not managed to achieve that. Also, there is not a lot of support available on hoopsnake, which makes matters even more complicated. At the moment, I am not familiar with VBscripting. I was already quite happy that I got this far with Hoopsnake :)
I did manage to sort the branches into groups, using another hoopsnake definition though.
Yes I think you've done very well to get this far in hoopsnake! The vein pattern looks really good...it's just keeping them organized that's so hard (I had a scripting background before I came to grasshopper, so I haven't had to use it much and I'm not very familiar with the component and have always engaged with loops and recursion in vb.)
So without being able to be too much of a direct help via hoopsnake, the general approach I would take I think would be to first identify all the first lines from your vein sources, and graft them (you've isolated each vein source...to get the first lines simply find each line that has no endpoints of any other line adjacent to its start point). Then for each of these "main" branches run through each remaining line and identify any with start points a distance of 0 from the preceding end point...anytime there is just one line that meets these criteria, simply collect them into the same path. However, when you have multiple instances of start points with distances = 0, you should select the line to continue your "main" branch by calculating the angle difference between the preceding line and each of its potential lines of continuity...the one that has the least angle deviation should then be appended to the "main" branch in question. All the rest should be assigned a new data path (ideally with the "main" branch it breaks from as an ancestor) and be allowed to go on their own quest for branch extensions.
I'm not sure how exactly to operate this algorithm in hoopsnake...particularly the bit where you append new path information based on sorted angle deviations along each step...but hopefully the process can be somewhat of a help...good luck!