Confused about output in the 'Getting Started' tutorial

Thiago's Avatar


02 Feb, 2013 12:23 AM


First of all, I want to thank you guys for Nodebox. What a great project!

Well, I have a question: I'm not sure if I fully understand the composition in the Viewer Pane in the last screenshot (right before "Saving and Export"). From left to right, top to bottom, I was expecting the following sequence: a triangle, a square, a pentagon, a hexagon, a triangle again (fine till here), and then a square again, but there's a second triangle instead. Two triangles in a row. Could someone please explain this output?

Best regards.

  1. Support Staff 1 Posted by lucasnijs on 02 Feb, 2013 08:21 AM

    lucasnijs's Avatar

    The answer lies into the amount you put in the sample2 node which specifies the amount of different hues, in the example set to 5. The list cycles through the previous list of sample1 which is set to 4 (4 different polygons). So it will wrap until it is filled and reuse the first value again. Solutions: 1: change the value of sample 2 to 4, so the lists match, or 2(what I assume you want): put the colorize node after the translate node so the list of 5 colors will cycle through the whole list of repeated shapes in the grid.

    Thank you for thanking us!

  2. Support Staff 2 Posted by Stefan Gabriels on 02 Feb, 2013 09:44 AM

    Stefan Gabriels's Avatar

    Yes it's like Lucas says a question of matching the two lists together. This is explained in more detail in the concepts page, under the section "List Matching":

    But I think it makes more sense for the sake of the example to not have the triangle repeat twice, and thus putting the colorize node -after- the translate node instead of before. We will update the documentation accordingly.

  3. Stefan Gabriels closed this discussion on 02 Feb, 2013 09:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

19 Jun, 2024 09:25 PM
19 Jun, 2024 04:41 PM
19 Jun, 2024 09:35 AM
08 Jun, 2024 09:05 AM
08 Jun, 2024 09:00 AM