Rectangle Filled with equal Circles

Dear All, I am wondering how to generate a rectangle with (W X L dimensions) filled with equal circles (with Radius = R)? Can you help me ? Kind regards,

Risposte (1)

Walter Roberson
Walter Roberson il 25 Mar 2018

0 voti

This is more difficult that it sounds.
That is, if the task is to fit the maximum number of possible circles with given radius into the rectangle, then the best fit can be fairly sensitive to the ratios involved, and the formulas for the coordinates can be fairly complicated.

5 Commenti

Thanks, But I'm Looking for Matlab function or code for this problem. Please, where can I find that? Thanks
Could you confirm that the task is to pack the maximum number of circles of given radius within the given rectangle size? That would probably be a fair bit of work to do well, and I do not know that you would be able to find MATLAB source for it.
One genetic algorithm implementation for packing in a square is at http://staff.itee.uq.edu.au/marcusg/cias.html
Note that the question would be quite different if the requirement were only to "do well" rather than the maximum. Calculations for a hexagonal packing can be done quite efficiently -- the problem is just that for ranges of ratios that you can do a little better than hexagonal if you work at it long enough.
Like if the task at hand is really only "placing nodes for a wireless sensor network" or something like that, then absolute best packing is probably not relevant.
Yes,I have a rectangle with fixed dimensions L X W (L=6,W=2), and n equal circles with radius = R, How can I packed max number of non-overlapped circles inside this rectangle. Thanks
Stephen23
Stephen23 il 25 Mar 2018
Modificato: Stephen23 il 25 Mar 2018
@Ahmad Hani: it does not matter how many times you ask this question, mathematics is not going to find a general solution for you in the next five minutes. Please do not repeatedly ask the same question, just because you did not like the first (correct) answer.
There is no known deterministic algorithm for this.
https://arxiv.org/abs/1008.1224 " Circle Packing for Origami Design Is Hard", Erik D. Demaine, Sandor P. Fekete, Robert J. Lang
"We show that deciding whether a given set of circles can be packed into a rectangle, an equilateral triangle, or a unit square are NP-hard problems"

Accedi per commentare.

Categorie

Scopri di più su Agriculture in Centro assistenza e File Exchange

Richiesto:

il 25 Mar 2018

Commentato:

il 25 Mar 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by