Design Script's ambiguous and versatile Replication Guides <1>
Last updated
Last updated
Here we will explore the role that Replication Guides play in building associations between elements while using Design Script in Dynamo Code Blocks.
While I've been fascinated by the magic of replication guides for many years now, I haven't really attempted to explain it's workings to even myself. I've got it to work mostly by intuition and many a time by trial and error. However, I'm going to pretend like I know what I'm talking about and invite you to participate in this charade.
The curtains rise and I (a) am deep in thought, seated at a table.
Kindly note that the colorful sliced sandwiches that make their appearance from time to time, however appetizing they might seem, are only props.
Contemplating.
I (a) am Thinking (1)
A + B = I Thinking
Apparent and straight forward so far, I suppose. But what am I thinking?
Pleasant Thoughts.
I (a) am Smiling (2)
A + B =
I Thinking, I Smiling
Still fairly apparent, I hope.
The Thinking (1) I (a) am now joined at the table by a Smiling (2) You (b).
Interrupted ? Maybe not.
A + B =
I (a) Thinking (1), You (b) Smiling (2)
But the Thinking I and the Smiling You aren't being adequately expressive. While I might be pleased with You joining the table and probably still Smiling, it isn't explicitly represented above. The stage is now set for our protagonist to make an entry and make such associations possible.
A <1> + B =
I (a) Thinking (1), I (a) Smiling (2)
You (b) Thinking (1), You (b) Smiling (2)
Introducing <1> after A, pairs each element of A with every element of B. If it follows B instead, the structure of the result is altered. The Transpose of the earlier result is obtained.
A + B <1> =
I (a) Thinking (1), You (b) Thinking (1)
I (a) Smiling (2), You (b) Smiling (2)
Lots of thinking and smiling, but to what end? The objective of such an exercise is to extract a selected few sandwiches from a generated stack of sandwiches while always trying to minimize the size of the overall sandwich stack from which the few are extracted.
We are now joined on stage by a Sitting (3) Cat (c) and a Standing (4) Dog (d) and that could mean more sandwiches.
I (a) imagine the Dog (d) to be Nipper, the Jack Russel Terrier from 'His Master's Voice' and that puts a smile on my face.
We would now need a Sitting (3) Dog (d) and Smiling (2) I (a) to capture this picture. That means, even more sandwiches.
So far, You (b) and I (a) have been in a world separate from the Cat (c) and Dog (d). Our activities and emotions seem to be mutually exclusive. But Nipper is a Thinking (1) Dog (d) and You (b) are Sitting (3), probably bored and exhausted by now. To capture this we would need to bridge the two worlds with a chain (<1><2>) of Replication Guides.
We could take this further (and further more). Imagine You and I are out on the streets, walking our Cat and Dog. We Smilingly greet others (Him, Her, Them) who are also enjoying the pleasant weather Sitting on benches, maybe.
With some orderly selection and grouping we should be able to intelligibly capture all this. Identifying, Capturing and Organizing data would be the first step (there could also be sleeping monkeys or frowning people present, but they are of no interest to us and will be ignored), followed by optimally obtaining combinations with Replication Guides (with a longer chain <><><> maybe) and filtering out those undesired.
Lets hope all involved behave as expected and the weather remains pleasant. Unpredictable behavior, like unpleasant weather can cause chaos.
I'll bring down the curtains on this explanation of my understanding of one aspect (association) of Replication Guides with a word of caution. While numerous combinations will be possible with different configurations of Replication Guides (which might be good to explore and go overboard with while getting a grasp of the concept and its workings), it would be wise to eventually keep it as simple as possible and avoid unnecessary depth and complexity by first cleaning up and properly organizing the initial inputs.