}
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
…
thank you very much for your reply pieter,I'm wondering if there were more than 3 expressions how will it be?I mean if it was X, X+12, X+24, X+36 and more...and that depended on a slider.
. This means that we know both point's Y values, and the relation of one X value to the other. What we are missing is where the apex point's X value is. If we add to both points a "fudge factor, Xo" allowing for the apex point's X value to be variable, we get 2 simultaneous eqns with 2 unknowns, Xo and A, which is the catenary function coefficient. [this is important so that we don't unintentionally preset the catenary coefficient]
so..
Y1 = A cosh ((X1-Xo)/A) - A
Y2 = A cosh ((X2-Xo)/A) - A
This is solvable, but because cosh (x) = (e^x + e^-x) / 2, we can't separate one of the unknown variables or use one of the other easy techniques. I used Matlab's fsolve function, but obviously while it is very doable to hitch up Matlab to Grasshopper, having this functionality in your script would be ideal.
These are just my meandering thoughts, I'm sure someone on the internet that is better at maths than me has an explicit solution worked out.
Here is what I wrote in Matlab:
iA=1;
iXo=1;
X1=4;
Y1=10;
X2=-3;
Y2=7;
F = @(V) [V(2)*cosh((X1-V(1))/V(2))-V(2)-Y1;V(2)*cosh((X2-V(1))/V(2))-V(2)-Y2];
InitialGuess = [iXo;iA];
Options = optimset('Display','iter');
XY = fsolve(F, InitialGuess, Options);
*Matlab code taken/edited from help file on solving nonlinear simultaneous eqns: http://www.mathworks.com/support/solutions/en/data/1-15NRJ/index.html…
not for the x-direction as shown in the attached graphic.
When the x direction slider is set to 4
in x direction five times 3 elements should be visible
which is not the case (see image 3) just five times 2 elements are appearing.
The same problem is happening when the x direction slider is set to 7
only 2 elements are shown in eleven rows.
Please have a look at the attached GH definition and the jpg which explains the problem.
I would be very glad if someone could help me to fix that problem.
Thank you for your support.
…