algorithmic modeling for Rhino
I have repetitive modules made up of lines. So each module is a tree and each line makes a path within the tree. As the modules multiply, each vertex of these lines should find closest vertices from neighboring modules (not itself) and join with them. This means that both the original vertex and the vertex from the neighboring module must be replaced by the joined vertex in both trees, without altering their tree structures.
I am trying to achieve this in Python and have an idea of the logic to achieve it, however, rolling my logic out in to actual code is posing to be challenging.
I have learned from ATLV how to start with points as itself to evaluate its surroundings. It links with its closest point. However, I need it to subsequently alter the modules that each selfPoint and closestPoint belongs to...(if I'm making sense...)
Please see image, I start with two triangles, the 2 closest vertices link.
I hope to find the midpoint and subsequently have the sides of the triangles adjust accordingly. I can imagine how to simply draw the lines, but I hope to replace the tree elements and maintain the original data structures....
Any advice would be appreciated!!
Tags:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by