Quantcast
Viewing all articles
Browse latest Browse all 20

More fun with arrays

Here’s a recent array question from the mailing list: How do you build an array that looks like this?

[0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, ...] ?

I didn’t check the other answers yet, because that would be cheating Image may be NSFW.
Clik here to view.
;)

When I look at that array, I see a repeating sequence of four integers, so that naturally suggests doing something with the Modulo node.

Image may be NSFW.
Clik here to view.
Arrays_0011_modulo

Using the If node is nice for clarity, but I could simply take the Boolean output of the comparison node.


Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 20

Trending Articles