to randomize my tree branches order using seed, for example the former tree is rearranged like this
{0} (N = 45)
{1} (N = 5)
{2} (N = 485)
{3} (N = 1001)
{4} (N = 66)
What is the function that could be used to do so?
Thank you for your help
…
etc.
Group 2 - 1, 6, 11, 16, 21 etc.
Group 3 - 2, 7, 12, 17, 22 etc.
Group 4 - 3, 8, 13, 18, 23 etc.
Group 5 - 4, 9, 14, 19, 24 etc. "
except in data, the branches start at 0, so 'group 1' is branch 0
as for the order of your points, that depends on the input prior sorting...
yrs …
points 0, X-1, (2*x)-1, (3*X)-1, (4*X)-1, (5*X)-1 and then
1, X, (2*x), (3*X), (4*X), (5*X)
2, X+1, (2*x)+1, (3*X)+1, (4*X)+1, (5*X)+1
and so on till
5, X+4, (2*x)+4, (3*X)+4, (4*X)+4, (5*X)+4
How can I do this best?
Thanks,
Niels…
ep is to understan the logics of what you want to do, in your case, build 4 point surfaces (u also need to know the right direction to build the surfaces). Then you can write an hipotetic list (by hand in a paper) of what you want. In your case the list was (0, 1, 3, 2) (2, 3, 5, 4) (4, 5, 7, 6), etc... if you can imagine building 2 lists, each one with the sequences (0, 2, 4, 6, etcc) and (1, 3, 5, 7, etc..) then you can manage with shift and graft to finally have four lists. A( 0 1 2 3 ...) B (1 3 5 etc..) C(3 5 7 etc..) D (2 4 6 etc..). And to achieve the 2 first lists, you need to get the odd and the pair numbers. The cull pattern does that amazingy well. With a pattern True-False you get de pair numbers, and with the False-True pattern you get de odd numbers.
Hope it was clear enough…
Added by Pep Tornabell at 5:32am on November 19, 2009