algorithmic modeling for Rhino
I don't even know where to begin.
In short, randomly populating a vast area (rectangle facade) with random rectangles turned out to be not so "random":
The definition works through a number of premade ("random") rectangles, picks one and places it randomly somewhere on the plane (checks the inclusion, intersection and stuff).
Immediately one can notice a pattern in the placing of the shapes. I'm curious to know if that is due to algorithm that component was written with (a rather rhetorical question))) and how it works through the large number of continuous seeds (1, 2, 3, ..., 2000). Is there a way to tweak it to generate "kinda sorta" something that could have looked like "randomness"?
Could it be that because the initial points seem to have a pattern the algorithm will tend to place certain size rectangles at certain points because of the way it checks inclusion, intersection etc.?
i.e. it is randomly placing the rectangles but after the inclusion / intersection rules have been applied it will more likely leave certain sized rectangles in certain places so the pattern of the initial points is reflected in the final placements.
If that makes sense?
No, it is really a stupid algorithm:
iteration i : seed = i+S (S=slider) ;
PopGeo(seed, boundary) -> point p
choose randomly (seed) one of the objects to pack, generate rotated and scaled versions at p, check which ones fit ok, keep the first one;
Thanks for sharing the packing example back then, it really helped me grasp the looping components (although I prefer anemone in the end for its accurateness with the wires, you will see in the attached file)))
Could you please show the centroids of the rectangles (without the rectangles), at first glance rectangles seem to be placed randomly, however pattern seeking brain can kinda spot that some of them are being placed in diagonal fashion. Again, it may be that I'm just seeing things.
I would also like to ask you about these bad guys (while I have a chance)))
I can't quite get what are they doing there? The definition seems fine without them but I'm clearly missing something here.
P.S. I've placed a piece of definition under the question, it should work just fine.
You forgot to take the preexisting population of points into account, in the PoPGeo component. (Thats what the D1 in anemone is made for).
The bad guys are probably just old stuff i forgot to remove when i adapted the code from hoopsnake to anemone, or unnecessary intialization check/debug.
Hi there Martyn,
I get your point, but, ah, I wish I had that awesome tool for making GIFs just from your screen, it would have been so much easier.
The thing is that they start out with plenty of space around and never intersect, it is when the area is filled it starts to check stuff. But from the beginning you clearly see how definition kinda jumps randomly around but with all these rectangles being place (like a history) you notice the pattern.
Oh, you mean it does the same thing every time? It always will unless you run it with a different set of random seeds. So, for example if you make the seeds equal to the Anenome counter + a parameter you change at the start of the run then each run will be different. If the random seeds are always the same each run then the results will always be the same!