Itoo Software Forum

Author Topic: randomisation... in order!  (Read 4647 times)

JTP Vis

  • Full Member
  • ***
  • Posts: 122
randomisation... in order!
« on: July 23, 2014, 12:10:45 PM »
Hi,

Following on from my last thread (here: http://forum.itoosoft.com/index.php?topic=2277.msg8519#msg8519) where I achieved a random order of 3 block sizes, where every other row is offset by 50mm so that the blocks don't line up in the rows, I want to add another piece to the puzzle.

In the image below I have every course/row set to the same size blocks.


I now want to add, randomly, another size of row, also randomly arranged as they are here. So,to explain, there might be one row of 160mm blocks followed by one row of 240mm blocks, followed by two rows of 160mm blocks, followed by one row of 240mm blocks followed by three rows of 160mm blocks... etc.

What I am not sure is where to put the sequences and where to put the randomisations. I hope someone can help.
I'm going to have a go, and post more if I get anywhere.

EDIT: I have tried so many combinations now, but I always get random blocks all over the place, not in rows of the same sized blocks. It seems that I need to randomise linear arrays somehow, but I'm not sure how to do that.

Cheers,

Bill
« Last Edit: July 23, 2014, 12:35:44 PM by JTP Vis »

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: randomisation... in order!
« Reply #1 on: July 23, 2014, 12:36:37 PM »
i would like to help, but i didn`t understand your described pattern
Rokas

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: randomisation... in order!
« Reply #2 on: July 23, 2014, 12:54:22 PM »
Here is a diagram of what I am trying to achieve. The red lines are 160mm wide rows of randomly selected different length blocks (as in the render in the first post) and the blue lines are 240mm wide rows of randomly selected different length blocks. Does that help?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: randomisation... in order!
« Reply #3 on: July 23, 2014, 01:11:07 PM »
Hi Bill,

A setup like this should give you what you're looking for. I've used a selector operator, exported the index and connected a random node. This is then set to generate a new number for each row.



This give you something like this, changing the seed will yield different results.



Hope that helps,

Thanks,

Paul
« Last Edit: July 23, 2014, 01:20:01 PM by Paul Roberts »
Paul Roberts
iToo Software

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: randomisation... in order!
« Reply #4 on: July 23, 2014, 01:20:41 PM »
HiPaul,

that is interesting! Will that work with different length of boxes added into the equation? All your red boxes and your blue boxes are the same length in your example.

I'll look into that.

Cheers,

Bill

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: randomisation... in order!
« Reply #5 on: July 23, 2014, 01:23:56 PM »
Hi Bill,

I've updated that post. It should be what you need now ;)

Thanks,

Paul
Paul Roberts
iToo Software

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: randomisation... in order!
« Reply #6 on: July 23, 2014, 01:26:35 PM »
Paul, that is genius. Thanks. I'll apply and post the result.

Cheers,

Bill

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: randomisation... in order!
« Reply #7 on: July 23, 2014, 01:44:27 PM »
Hi Paul,

that is extremely close actually, and here is the result, but as you can see some courses line up. What I need to do now is introduce an offset of say 40mm to every second row; is that possible?

EDIT: is it possible to then add a conditional formula so that if the y row value is an even number then use the x transform of -40mm?

Bill
« Last Edit: July 23, 2014, 02:00:22 PM by JTP Vis »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: randomisation... in order!
« Reply #8 on: July 23, 2014, 02:06:05 PM »
Hi Bill,

Please see the attached. I've added two conditional operators so that the first segment of every other row can be given a negative padding value to create the offset. The only disadvantage of this technique is that you have to use clipping splines to determine the area.



Thanks,

Paul
Paul Roberts
iToo Software

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: randomisation... in order!
« Reply #9 on: July 23, 2014, 02:44:51 PM »
Thanks to everyone for their help. See attached for the result. They still seem to align themselves sometimes, but I suppose that is what happens with randomization: sometimes they are aligned.
 :)

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: randomisation... in order!
« Reply #10 on: July 23, 2014, 03:36:22 PM »
Looks great!  :)
Paul Roberts
iToo Software