Bubble Diagrams with Kangaroo

Hi All,
I’m trying to create a bubble diagram with Kangaroo and Grasshopper (new to both). Each polygon should represent a room and its area is a function of the polygon radius. Currently I have three problems.

A) How to make the line connecting the two rooms move as I grab and collide the polygons.

B) How to prevent the line from stretching beyond a certain limit. That means if the original length of that line is 4 I would want it to stay the same length as I move the polygons around. In further iterations I would assign different lengths to different connection lines according to the type of adjacency between the squares.

B) How to prevent the squares from rotating around the corner as I grab and move them in Rhino ? I’m trying to keep the square’s rotation to 0 relative to the global XY plane as shown in the picture.

Thanks!

Collide2D_Matrix.gh (24.8 KB)

That’s a cool experiment, any updates ?

Maybe that helps:

Bubble Diagram Problem - Grasshopper - McNeel Forum

LFP_Collide2D_Matrix.gh (29.5 KB)

A) Show the center points instead of the rectangles, generate the line from the output.
B) Clamp Lenght component
2nd B) Direction Component to keep the directions of the edges

yes Bubble Dojo Casa House | Food4Rhino