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

30 Nov, 2023 08:38 PM
29 Nov, 2023 01:33 PM
29 Nov, 2023 05:30 AM
28 Nov, 2023 10:03 PM
28 Nov, 2023 12:38 AM

 

27 Nov, 2023 04:40 AM
26 Nov, 2023 10:02 AM
22 Nov, 2023 09:33 AM
20 Nov, 2023 08:54 PM
17 Nov, 2023 01:43 AM
15 Nov, 2023 06:58 AM