I am relatively new about Anemon and growth processes in Grasshopper. I have created a growth process and would like to add more conditions to it. In this case, it is pentagons that are randomly mirrored randomly on one side of the pentagon. However, they intersect. I’ve tried a collision component but i have no clue how to fix this.
Do you have any idea how I can get it to be an arbitrarily growing pattern, with the pentagons neither overlapping nor crossing?
Other than intersecting you have also a lot of overlapping polygons (duplicates)…
Let’s find a solution that solve both problems at the same time.
For example, by making the polygon a surface, and joining the surface to a total main polysurface, you can then use only naked edges where to try to add a new polygon (surface) … (internal edges are not suitable for a new surface origin)
Interesting/cute pattern…
In this solution new element is added only if it touch main polysurface on just one side.
It could fit in some other places, but it is discarded anyway.
Looks great, would love to see it. Do you mind posting a more readable version of your code so I can replace these missing R6 bits to make it work in R5? Mass Multiplication?
Funny thing is that the code appears to work, except for detecting overlaps.
Still, the method to check if to discard a new surface is incomplete, it could fail (and will).
(it is only checking vertexes of new polygon on main polysurface, mid-segment intersection could happen… always check results)
For large element count the loop would exponentially waste attempts on non-suitable edges (and that would have a growing fail rate over time), so I added a point list to store there failed attempts (by saving edge mid-point, as index is unusable in this situation), so it can avoid attempt again from the same edge.
In pic, point are old failed attempts.
Further check should be done in big count, as this method still leave “attempt-able” a lot of edges that are clearly not suitable…
Up to V2 new elements could still intersect in some way with main polysurface, added a reverse test (inverse as previous method) that work in parallel.