Two GH definitions presented below are aimed at shuffling panels by replacing their indices randomly. “Shuffling Panels Ver.1” is without probability distribution and “Shuffling Panels Ver.2” is the one with.

The common set up of our targeted space for both definitions is a 4 x 4 grid along which mesh panels are arranged and color-coded according to the indices of each grid cell. For the random component, we use one of GH components, Jitter, which allows us to shuffle those list indices of the grid cells with its parameter, shuffling strength and seed. In the version 2, in order for us to set frequency of all outcomes as random distribution before shuffling panels, we incorporated GH Graph Mapper and our custom python script component Get Distributions.

Parameters (Input) | Required: Base rectangle or square, A list of ratios Optional: Seed, Strength |
---|---|

Return (Output) | Rectangle divisions based on ratios |

GH Key Components | C# Script Bake Most Attributes, Gradient, Graph Mapper, Jitter, Python Script Get Distributions |

## Version 1

**without Probability Distribution**

There is no random distribution set on this version of “Shuffling Panels” but we could say that it is uniformly distributed because every index occurs only one time. The occurrence on the left is with a shuffling strength of 0 which represents the initial grid condition and the one on the right is with a shuffling strength of 10, which is randomly shuffled by its max strength.

100-100:

Variations of the GH definition “Shuffling Panels Ver.1” with different shuffling strength 0 to 1.

100-05:

With the use of the modulus, it can now have indices ranging from 0 only to 5 but still uniformly distributed.

## Version 2

**Use Case Random Areas in Multiple Domains**

Unlike “Shuffling Panels Ver.1” without distribution, in this example, the frequency of the random variables is controlled by the distribution generated by Graph Mapper component’s value as ratio factors. This example used the “Gaussian” type of graph. The occurrence on the left is with a shuffling strength of 0 which represents the initial grid condition and the one on right is with a shuffling strength of 10, which is randomly shuffled by its max strength.

Those figures present the variation of random patterns through a shuffling strength 0 to 1 and the various types of distribution (frequency distribution) available in GH Graph Mapper. “Linear”, “Gaussian”, and “Parabola” types of graphs were used.

## GH Definition

## Flowchart

- Random Subdivision
^{post type} - NA

^{post type}” for example, the factors which generated random distribution on the “Shuffling Panels Ver. 2” can be directly used as the ratios of subdivided areas on a given area and the code can divide the area recursively according to those ratios in randomized order. This enables the initial arrangement of panels with the distributed indices to be as many as you could adjust with parameters like seed and shuffling strength is almost freely chosen. It is not limited by the order of rendered panels that are actually provided by the software. (The second row of the diagram above shows this process.)

## No Comments