How to set a Random Rotation? / Reflection

2urn's Avatar


16 Dec, 2012 10:52 PM

Nodebox beginner, here:

I have svg shapes representing tiles in an overlapping grid-based array.
The tiles can be oriented up to 8 different ways:

• Rotation Angle: 0, 90, 180, 270 (which I've figured out how to generate from Angle and Range Nodes)
• Side: Front or Back  (basically a boolean)

But I can't figure out how to randomly pick from the 4 possible angles and 2 sides.
I've tried Shuffle->First1 but the shuffle result is always constant unless I vary the seed manually which defeats the point of a random output.

How do I randomly select 1 from my ranges?

Much appreciated,

  1. 1 Posted by 2urn on 17 Dec, 2012 12:29 AM

    2urn's Avatar

    Here is test image for where I'm stuck--all arrows have same orientation instead of what is desired (above).

  2. 2 Posted by diki on 18 Dec, 2012 07:19 PM

    diki's Avatar

    I think it might be a problem of where you put the shuffle/rotate node -
    e.g. at the 'top' of a 'chain', it will only influence the source geometry (all arrows will have the same orientation), while at the 'bottom', it can influence every arrow in the grid -
    well, that is a bit hard to explain :P

    But I came up with an example, see the attached screenshot & .nbx

  3. Frederik De Bleser closed this discussion on 21 Jan, 2013 01:38 PM.

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

16 Apr, 2024 06:18 PM
16 Apr, 2024 04:23 AM
08 Apr, 2024 01:28 AM
07 Apr, 2024 11:50 PM
05 Apr, 2024 11:47 PM


05 Apr, 2024 12:30 AM
25 Mar, 2024 08:48 PM
14 Mar, 2024 07:40 PM
14 Mar, 2024 07:38 PM
12 Mar, 2024 06:14 AM
12 Mar, 2024 05:22 AM