Jump to content
cloudfx

filling grid with circle shapes?

Recommended Posts

Hi, I am trying to fill up a grid with circles with random radius like below rough drawing but the actual circle counts has to be about 300,000.

What would be ideal way to do this in houdini?

I've tried to use bullet to throw bunch of sphere primitives and let me fille a box and flat it to get the shape but if there is more procedural way to do this, please let me know!

Share this post


Link to post
Share on other sites

Hi, I am trying to fill up a grid with circles with random radius like below rough drawing but the actual circle counts has to be about 300,000.

What would be ideal way to do this in houdini?

I've tried to use bullet to throw bunch of sphere primitives and let me fille a box and flat it to get the shape but if there is more procedural way to do this, please let me know!

post-3325-134366752958_thumb.png

Share this post


Link to post
Share on other sites

forums.odforce.net/index.php?/topic/12892-square-packing/

forums.odforce.net/index.php?/topic/6494-poor-mans-circle-packing/

might be of help?

Share this post


Link to post
Share on other sites

forums.odforce.net/index.php?/topic/12892-square-packing/

forums.odforce.net/index.php?/topic/6494-poor-mans-circle-packing/

might be of help?

Super helpful.

Thank you eetu.

Share this post


Link to post
Share on other sites

Super helpful.

Thank you eetu.

I wrote a python circle packing otl a while ago, my computers at the genius bar right now but I'll try to post it tomorrow

Share this post


Link to post
Share on other sites

I was thinking that you might get a "better" looking distribution of points if you ran an iteration or two of Lloyd's relaxation on it before calculating the circle radii.

LloydsRelax.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

I was thinking that you might get a "better" looking distribution of points if you ran an iteration or two of Lloyd's relaxation on it before calculating the circle radii.

Cool! That's a very interesting technique - thanks for sharing it!

I was also considering using noise to color the geo before scattering points or applying a particle system with basic magnetic properties to get some intersting arrangements.

What do you think would be the best way to get all the circles to be mutually tangent? I was thinking of using a solver sop with a foreach loop and slowly growing each circle, but I'm not sure if there's a less "brute force" method?

Edited by jkunz07

Share this post


Link to post
Share on other sites

You can try using closest the neighbour point after the Triangulate2D as your radius.

Er, scratch that, it doesn't work that well. Although you could try using it as your initial guess before incrementally expanding your radii.

Share this post


Link to post
Share on other sites

I was playing with the idea of circle packing the other day, came up with this.

It runs off a more iterative aggregation model, checking random points perpendicular to existing ones and seeing if a randomly sized circle can be created.

Could probably be a lot more efficient though.

circle_packing.hipnc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×