I am losing my head, after so many hours of just slamming components together I surrender. I really need to understand data structures at a more fundamental level…
My goal here is to create a facade with shingles. They are supposed to vary in length and width but have a fixed distance between its horizontal neighbours. Think, vernacular, handmade, rough.
However, patterns emerge if you look hard enough. And I really do not understand why.
I just want each horizontal line to be Evaluate Curve’d at the Mass Addition’ed, randomized lengths of the shingles.
The Mass Addition’ed number is also to be deleted if it is Higher Than the original line that is evaluated. This is maybe a separate problem in itself, but I do this to not have any issues that might occur when feeding a parameter that exceeds the line lenght.
The main problem for me right now is that the pattern make the whole idea of an organic facade fall apart. My idea now is that the initial random function
And the fundamental problem is that I don’t understand how data trees operates, and in which order functions are applied to data within.
Please help me, I have put so many hours into hoping something randomly just works at this point.
I am tunnel visioning a bit and would love to clarify what I want to happen - just ask if something needs clarification. Super thankful for the resources here.
Patterns emerge when dimensions (any values) are repeated. Your code is too difficult for me to modfy for several reasons; one of them is you have renamed standard components, which makes the code difficult to read. Renaming inputs and outputs is fine but avoid renaming components.
The Random component output is two branches of 14 values each, so that’s part of the problem! It looks like you are re-using ‘Seed’ values too?
Man for something that should be a very simple algorithm it is so complicated. Make yourself a favour and start from the beginning, keeping it simple. it will help, i promise.
It’s not as bad as you say. The script is broken down into steps and annotated. That’s more than can be said of alot of scripts submitted here. While some parts of the script become obtuse, I didn’t have any difficulty following the intent of its authorship.
Where the OP struggles is creating random numbers for branched data. This is most apparent in the shingle length where the same seed is used for each row of shingles:
There are different approaches to dealing with this. Here I have calculated the total number of random numbers needed to be able to use a single random number seed, then restructured the output of using Unflatten Tree.
A better approach to determining the shingle widths would be to first start with a regular pattern and modify the shingle widths with randomness so that the seams of horizontally adjacent shingles cannot coincide between rows.
Brevity comes with experience. Also what you believe is just belief until you prove it!
@Jonathan19 to answer your question about the text box, the components in the Sets panel deal with primitive values (text, numbers, bools, etc.) but not geometry. You have to be explicit in the data type, or the component assumes it is dealing with text. So here, you would have to define the bool type:
First off. Thank you so much for your time and effort.
I have tried to remove all the changed names of the components - I will keep that in mind in the future, to not modify them.
In this case, the two branches does (in my mind) represent the the surfaces. Both which are the same height and therefore with 14 horizontal lines each.
I want to have 14 different seeds then.
My idea is then to get 14 * (the maximum amount of possible shingles that can in theory fit on each line). Which I get in the Rounding component in the shingle_width_generator. And it does generate that 14*max_amount for the two surfaces. All unique numbers N.
I then want to feed these numbers N, divided back into the corresponding two branches so that all lines can be evaluated at their unique parameter N.
And somewhere in here, randomness and control over tree understanding is lost on me.
As for the shingle base lines, that does indeed look odd - but works on my machine - not sure what to do about it, sorry.
In my .gh file, I began reconstructing your script but stopped short when I ran into the section where you begin to determine your shingle widths. The only thing to glean from my reconstruction is how I dealt with your “tree jiu jiutsu”. That can be accomplished with a simple Relative Item component.
The real change was done in your “LENGTH w/ VARIATION” cluster. It is exactly as shown in the screenshot.
The constructed domain is the shingle width.
“List” is the list of line-like curves. You created the cluster, so you should know this better than I.
Better to have two seeds (one for shingle width and and one for shingle length) and two Random components to generate hundreds of truly random shingles. Otherwise you end up with patterns from duplicate values.
I believe the source of this acronym may be Reddit sub, but it gets a lot of social media usage. Probably makes zero sense if you’re not thinking in English!