Kangaroo

THIS FORUM IS NO LONGER ACTIVE. PLEASE POST ANY NEW QUESTIONS OR DISCUSSION ON:

https://discourse.mcneel.com/c/grasshopper/kangaroo

The discussions here are preserved for reference, but new questions posted here are likely to go unanswered.

Kangaroo is a Live Physics engine for interactive simulation, optimization and form-finding directly within Grasshopper.

circle paking on 3D surface

Hello everyone !
sorry for may ask same question again  , but I cannot found solution how to fix it .
the target is to make limit border of shape for circle paking  .
I add some button  to script , which I load from  blog , for make possibly use different  diametr of circle . now it can paking , and each circle stop when reach border of surface by it's center.
but I would like to make  circle stop when reach border of surface by it's outline .
is it possible to do something in this script , for it work as I need ?help%20002.3dm

help001.gh

 

  • up

    Daniel Piker

    Hi Dmitry,

    Here you go:

    It uses the offset curve on surface component to get the right boundaries for the different circles

    5
  • up

    Daniel Piker

    Hi Dimitry,

    It seems there is something wrong with Grasshopper's 'offset curve on surface' component - I've raised it with David here.

    In the meantime, it might be better to get the offset boundary by piping the original boundary to the desired radius, and intersecting the pipe with the surface.

    I see you are using only a small number of different circle radii, and if you can restructure the definition so that the boundary offset only gets calculated once for each unique radius (instead of for every circle), it should be much quicker to adjust.

    The next version of Kangaroo also contains some line-collision tools that might be possible to use for this.

    As for the gaps between the circles -

    A circle packing with only 3-sided gaps between tangent circles is called compact. (Such packings are very interesting mathematically: http://www.cs.jhu.edu/~misha/Fall09/Stephenson97.pdf)

    I think it will not be possible to get an exact compact circle packing within the boundary and also prescribe the radii of the circles. If you do allow many different circle radii, then you could use the different approach I showed here:

    http://www.grasshopper3d.com/photo/circle-packing-1

    Is the aim to cover the surface using circles of only 8 different radii, while minimizing the area of the gaps between them ?

    13