algorithmic modeling for Rhino
Hey
i have N elements list and i want to create a definition that allows relist them in any possible order(no repeat).
Expample: By 3 points {0,1,2} v(variation number)=3!
Result i'm looking for is
v=0 - 0,1,2
v=1 - 0,2,1
v=2 - 1,2,0
v=3 - 1,0,2
v=4 - 2,0,1
v=5 - 2,1,0
Result order is not important.
Would be grafetul for any help! :)
Pascal definition:
for i:=0 to 2 do
for j:=0 to 2 do
for k:=0 to 2 do
begin
write(i,j,k);
writeln
end;
Tags:
replace letters with numbers then either:
or... at the end of the sub put this in:
Dim charTree As DataTree(Of Char) = charFN(permList)
A = charTree
Function charFN(ByVal permList As List(Of String)) As DataTree(Of Char)
Dim tTree As New DataTree(Of Char)
For i As Int32 = 0 To permList.Count - 1
Dim nPath As New GH_Path(i)
tTree.AddRange(permList(i).ToList, nPath)
Next
Return tTree
End Function
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by