Grasshopper

algorithmic modeling for Rhino

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

 

Views: 13742

Replies to This Discussion

Hi Dmitry,

Here you go:

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

Attachments:

Hello Daniel !

and Thank you very much !

 this almost perfect algoritm ! but it works a little bit slowly in my cpu  if I make interactiv  changes in diametr and the number of circles.

as I understand the principle of this idea is make ofset curve on surface, equal radius of each size of circle  right ?

but there is one more important parameter for me  , this distance  and space between 3 - 4 circles . it is should not be to big .

that is why   I need to use slider for change diametr of circle in real time , during the circles still looking its place.

look at attach foto please .

if I start to move  slider , for reduce space between circle ,  the diametr of circle start to change and this make affect to offset curve . offset curve start recalculate again and paking algoritm stops , and I need  start it again .
but this  new start have different place of circle with new different space between circles which I need  to reduce again to move slider .

is there any other way how to make this more fast ?

the total target is make similar what this script for rhino  to do , by grasshoper .

may be need to add some  voronoi algorithm or paneling tool ?

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 ?

Here's an improved version of the definition that allows easier variation of the radii while it is running:

Attachments:

wow !
 it looks realy close to my dream !
and it work very well , but only with this surface .

if I try to select other surface , this is start  looks , like a little bit more far from a dream :-)

Daniel !

the number of different  circle diametr can be more then 8 , it is no problem .
only have limit by smallest size  ,
smallest cannot be  smaller than 0.8-1.0 mm.
in color gemstone it is realy difficult to  found less then 0.8 mm diametr.

in idiale it will be great make size slider , for all quantity of stone .
for adjustment each stone , as sample if have 60 stones , make 60 sliders.
but it is difficult to found correct position of each circle in surface without any marker .
is it possibly  to make
some visual marker on each circle and slider  ?
 maybe number or different   color in circle ?
as sample , slider nuber (1) , and inside circle can see also  nuber (1) .
or one slider is green color and circle is green color , other slider  is red and circle is red and so on

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service