oning behind using the equality component to test for even numbers is flawed because of the data matching used by gh. It is testing like this:
0==0 True
2==1 False
4==2 False
6==3 False
etc
.............
Where as a Modulo 2 would work like this
0%2 = 0
1%2 = 1
2%2 = 0
3%2 = 1
4%2 = 0
5%2 = 1
6%2 = 0
7%2 = 1
8%2 = 0
9%2 = 1
......
Also I notice you have some errors in your expressions producing Nulls.
If you want it to be twice the value then you should have 2*D in the Expression and 10*D in the other
....
I attach a working version.…
That is the [List Item] component. In the latest GH versions you can zoom in on the component and add additional outputs for +1, +2, +3 etc. and -1, -2, -3 etc.
n the SetA lenght there could be a boolean to toggle an append function.
SetA = {U, V, W, X, Y, Z} ,
SetB = {1, 2, 3}
Imap = {10}
Append = True >> Result = {U, V, W, X, Y, Z, 1, 2, 3}
Append = False >> Result = {U, V, W, X, Y, Z}
This is different from the "list insert" component that you wrote but I find it more intuitive. Maybe I just have a problem with the name, I would understand it better if it was called "Item insert"... I'm no english expert so I may be completely wrong.
Perhaps there could be two components one "Item Insert" and another "List Insert"...
ReplaceItem would also be very useful.…
Added by Frane Zilic at 1:57pm on September 10, 2010
h i get 5 points (kinkos), Lets say 0,1,2,3,4,...But all segments are of different sizes,..that is, I know the distance between 0 & 1 is 2 units,Distance btw 1 & 2 = 3 unitsDistance btw 2 & 3 = 1 unitDistance btw 3 & 4 = 4units,..How do i do this division,. Could anyone help please,..Thank you…
rve
10 curve
11 curve
12 curve
13 curve
...and I'd like to rearrange the order in which the curve are listed, to something like this:
{0,0,0}
0 curve
1 curve
8 curve
9 curve
10 curve
11 curve
2 curve
3 curve
4 curve
5 curve
12 curve
13 curve
6 curve
7 curve
I hope this makes sense.
Thank in advance for any advice,
John…