Jump to content

Circle-packing with preferred neighbors


guache

Recommended Posts

I managed to avoid this problem, but I'm still curious about suggestions how to do this in Houdini. On a 2D plane, I needed to tightly "pack" a bunch of circles of differing sizes ("pack" in the sense of bringing as close as possible, without overlaps). Each circle has its own "id" and the "id" of its "best friend", that is, the most preferred neighbor (see pic below). The goal is to pack the circles in as small a space as possible, while minimizing the sum of distances between all "friends". The Point Relax SOP doesn't really address this problem: it spreads the circles around, but doesn't optimize distances between "friends". One solution could be an RBD sim: spread the discs around, lock them to the plane, give each one a "force" towards its friend, and run several sims with different starting positions, and pick the best result. I managed to avoid this by having equal circles in a hexagon formation (bottom pic), and simply assigning "friend ids" to adjacent circle pairs. But if anyone sees some other approach to the original problem, I'd love to hear it.

Houdini007fh52.png.23b9af179a622f8c4823a583a4773b74.png

Houdini_00745ss.png.7c59c6aef1848b1c6715b139837ec7c8.png

Edited by guache
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...