5
$\begingroup$

I have a circle of radius $r$, and I have a bounding box with 4 sides, $a$, $b$, $c$ and $d$ as illustrated in the below diagram:

Here are a few constraints

$r \geq a$ $r \geq b$ $c >> a$ $d >> a$ $c >> b$ $d >> b$

$a$ and $b$ must be perpendicular to $d$ segment.

Another condition is that the the circular sectors must touch one of the long line segment ( the top line segment in this case), base on another long segment ( the bottom line segment in this case) and must not go out from it.

What is the algorithm/equation that allows me to generate all the circular sectors that

  1. Touch one of the line segments
  2. Won't go out from it
  3. Fill the bounding box ( as defined by $a$, $b$, $c$ and $d$) as compactly as possible?
  • 0
    @lhf, I think you are right; I've updated the title.2011-06-07

1 Answers 1

1

There is quite a bit of information on circle packing on packomania, including packings in rectangles. So some of it may be of use to you.

Here's another page on the same theme.

  • 0
    @Ngu No problem, I just thought $i$t was worthwhile making you aware of the site in case there was something there that you could use.2010-12-08