How to set a Random Rotation? / Reflection

2urn's Avatar

2urn

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,
Dimitry

  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

Generic

? 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

10 Sep, 2024 03:41 AM
09 Sep, 2024 02:15 PM
07 Sep, 2024 05:16 AM
05 Sep, 2024 02:21 AM
04 Sep, 2024 05:01 AM

 

03 Sep, 2024 10:07 AM
02 Sep, 2024 05:56 AM
31 Aug, 2024 11:07 PM
27 Aug, 2024 12:08 AM
26 Aug, 2024 01:02 PM
26 Aug, 2024 07:18 AM