Primer: n-Dimensional Lists - 3D Lists Excercise

I’m trying to figure out why a ListCreate wont work with ListMap to loft the surface in the example file provided in the primer. I understand that transpose doesn’t work with 3D lists, okay fine. But i’m looking at the lists and they’re exactly the same except for where I annotate “a” and “b.” “a” has a only a dot, and “b” has a dot with line. This must be the visual cue for why it wont work but I don’t understand what it means.

Thanks! I’m trying to understand Lists as bet as possible and want to know what i need to look out for.

Source: n-Dimensional Lists - Dynamo

  • " In the previous exercise, we were able to use a List.Transpose to create a ribbed structure. This won’t work here. A transpose should be used on a two-dimensional list, and since we have a three-dimensional list, an operation of “flipping columns and rows” won’t work as easily. Remember, lists are objects, so List.Transpose will flip our lists with out sublists, but won’t flip the nurbs curves one list further down in the hierarchy."*

Without going through all the steps of this example myself, it’s hard to know exactly what the goal is and how to address your issue, so I’ll just give some general information for now.

I’m pretty sure this is just a visual bug / rendering issue. A list structure is just a list structure. There’s nothing else to differentiate the two.

They look the same, but they’re not. You can’t really tell because the NurbsCurve objects don’t have any unique identifiers, but the structure and sorting has changed. List.Join on its own will just make the two input lists into two sublists under a new list structure. List.Join with the function mapping will treat each sublist as an input instead of the whole list all at once. (Ironically, this is the same as just the transposed structure.)

The Primer is a bit misleading here. The first thing to understand is that a list already has one more level than an item; therefore a 2-Dimensional list is a 3-Dimensional structure. Transpose assumes a list structure representing a table, where:

  • @L3 represents the overall table
  • @L2 represents the row
  • @L1 represents the column

Example using my image above: number 7 in the very first code block on the left would be found in row[1], column[2] using the standard zero-based indexing. This is a 2D list (3D structure) so it only represents one table, hence no need to specify a 3rd index.

This is where the Primer gets a little misleading. Transpose “switches” rows and columns in a 2D list, but that doesn’t mean you can’t use the node on higher level lists. It just means that the node will treat the n-1 list level as the row when used on an nth-dimensional structure.

We can get around this by mapping a function or using list levels. In almost all cases, list levels is the preferred method for handling complex list structures. The List.Map node is now obsolete for this general use case - it does however do a decent job of visualizing how list levels works when getting started.

Here you can see the method using function mapping:

And here you can see the method using list levels:

2 Likes

Ahh okay! I see… Thanks!

I’m hoping for the day when this stuff just clicks!

It takes time with some of this. Best advice I can give is to just play around with things and see what happens.