generative modeling for Rhino
I am trying to generate Penrose tiling using inflation-deflation method. I use a nested list to store the tiling pattern, but the output of the nested list shows no data, only description of the data type (Generic list).
Is there a way to output the nested list as a tree? Or is there any other data type that could do the job?
Thanks a lot!
Versions: Rhino5 and Grasshopper 0.8.0066
The file and screenshot are attached
You cannot output nested collections, you must convert them into a tree first.
Dim penroseTree As New DataTree(Of Double)
For i As Int32 = 0 To PenroseTiles2.Count - 1
penroseTree.AddRange(PenroseTiles2(i), New GH_Path(i))
Thank you David!
Where can I get more information about DataTree and GH_Path? I couldn't find them on RhinoCommon or MSDN.
The nested list in my VB script seems to get modified unexpected. To be specific, "penroseTiling2" behaves normal on its own, but after the addition of the code for creating the next generation of tiles (penroseTiling3), it got modified without any code that modifies it. I couldn't figure out why.
I am wondering if it is related to the way how the code is parsed.
File is attached.
List(Of Double) is a reference type. When you put one into a List(Of List(Of Double), then modify the original list later on, it will change everywhere.
'add the tiles into penroseTiling2
If you want to modify ALTile2a later on you should duplicate it when adding it to the PenroseTiling2 instance.