;1},{0;2},{0;3}, (note that the first item is NOT {0,0})
{1;1}{1;2},{1;3},
{2;1},{2;2},{2;3},
{3;1}{3;2},{3;3}...
Well I'll just upload an extract of the definition. The data path should be the same, but with the items in the last path shifted to the first path, and the items in the first path shifted to the second path and so on.
I'll keep trying. …
}
X*
{0;2;0}{0;2;1}{0;2;2}{0;2;3}
{0;3;0}{0;3;1}{0;3;2}{0;3;3}
And now we want to insert at the place marked with X* another list formated like:
{0;0}{0;1}{0;2}{0;3}
So we want it resulted like:
{0;0;0}{0;0;1}{0;0;2}{0;0;3}
{0;1;0}{0;1;1}{0;1;2}{0;1;3}
*{0;2;0}{0;2;1}{0;2;2}{0;2;3}* - the inserted list
{0;3;0}{0;3;1}{0;3;2}{0;3;3}
{0;4;0}{0;4;1}{0;4;2}{0;4;3}
Since we plug the list formated with only {A;B} into the place with has {A;B;C} then that list has to be reformated in the same manner and every lists which are next to it have to be reformated too by adding 1 to B so it's {A;B+1;C}.
Param viewer with the data tree diagram is a great tool for visualising data structure. It seems to me that it would be easier to play with lists in the same way as we do with connecting components together. So if we have list of points and we want to insert them at some certain place in the tree then we don't need to play with Patch Mapper, Insert List and others but we just plug them on one go into the tree and format will adopt itself automaticly according to the choicen position on the tree.
Same with OUTPUT. We can pick some elements from the tree and connect it to the component which will receive every element from that branch. (example):There is a list of points with complex data structure. we pick node {0;0;3} and move it out from param viewer to connect it with point component which will receive all the sublists with elements which are under it:
{0;0;3;0}0 - pt1 - pt2 - pt{0;0;3;1}0 -pt1 - pt2 - pt3 - pt...and so on...
I don't know if this solution make better sense then other solutions of this case. Maybe there are easier ways to do it without such complication and I have no idea about it :)
greets!
Adam
…
ee 3)
{5}
0 15
{6}
0 16
And I want to place points at every possible combination of these coordinates, treating Tree 1 as X coordinates, Tree 2 as Y coordinates, and Tree 3 as Z coordinates. Also, I would like the list of points to be a tree with paths corresponding to the coordinates. Wouldn't it be nice if I could plug these trees into a Point XYZ, with a new "branch cross reference" method, and get the following result?
{0:3:5}
0 {10.0, 13.0, 15.0}
{0:3:6}
0 {10.0, 13.0, 16.0}
{0:4:5}
0 {10.0, 14.0, 15.0}
{0:4:6}
0 {10.0, 14.0, 16.0}
{1:3:5}
0 {11.0, 13.0, 15.0}
{1:3:6}
0 {11.0, 13.0, 16.0}
{1:4:5}
0 {11.0, 14.0, 15.0}
{1:4:6}
0 {11.0, 14.0, 16.0}
{2:3:5}
0 {12.0, 13.0, 15.0}
{2:3:6}
0 {12.0, 13.0, 16.0}
{2:4:5}
0 {12.0, 14.0, 15.0}
{2:4:6}
0 {12.0, 14.0, 16.0}
In this form of cross referencing, every combination of individual branches from the different lists is used as separate input, and the output for each combination is put onto a branch in the result whose path is the concatenation of the input branch paths used.…
Added by Andy Edwards at 7:03pm on November 3, 2009
ems in the same way. Lofting was particularly difficult, you had to have a separate loft component for every lofted surface that you wanted to generate because the component would/could only see one large list of inputs. Then came along the data structures in GH v0.6 which allowed for the segregation of multiple input sets.
If you go to Section 8: The Garden of Forking Paths of the Grasshopper Primer 2nd Edition you will find the image above describing the storing of data.
Here you will notice a similarity between the path {0;0;0;0}(N=6) and the pathmapper Mask {A;B;C;D}(i). A is a placeholder for all of the first Branch structures (in this case just 0). B is a place holder for all the second branch structures possibly either 0, 1 or 2 in this case. And so forth.
(i) is a place holder for the index of N. If you think of it like a for loop the i plays the same role. For the example {A;B;C;D}(i) --> {i\3}
{0;0;0;0}(0) --> {0\3} = {0}
{0;0;0;0}(1) --> {1\3} = {0}
{0;0;0;0}(2) --> {2\3} = {0}
{0;0;0;0}(3) --> {3\3} = {1}
{0;0;0;0}(4) --> {4\3} = {1}
{0;0;0;0}(5) --> {5\3} = {1}
{0;0;0;1}(0) --> {0\3} = {0}
{0;0;0;1}(1) --> {1\3} = {0}
{0;0;0;1}(2) --> {2\3} = {0}
{0;0;0;1}(3) --> {3\3} = {1}
{0;0;0;1}(4) --> {4\3} = {1}
{0;0;0;1}(5) --> {5\3} = {1}
{0;0;0;1}(6) --> {6\3} = {2}
{0;0;0;1}(7) --> {7\3} = {2}
{0;0;0;1}(8) --> {8\3} = {2}
...
{0;2;1;1}(8) --> {8\3} = {2}
I'm not entirely sure why you want to do this particular exercise but it goes some way towards describing the process.
The reason for the tidy up: every time the data stream passes through a component that influences the path structure it adds a branch. This can get very unwieldy if you let it go to far. some times I've ended up with structures like {0;0;1;0;0;0;3;0;0;0;14}(N=1) and by remapping the structure to {A;B;C} you get {0;0;1}(N=15) and is much neater to deal with.
If you ever need to see what the structure is there is a component called Param Viewer on the first Tab Param>Special Icon is a tree. It has two modes text and visual double click to switch between the two.
Have a look at this example of three scenarios in three situations to see how the data structure changes depending on what components are doing.
…