# Algorithm to Pack as Many Circular Segments right into a Rectangular Box

I have a circle of distance $r$, and also I have a bounding box with 4 sides, $a$, $b$, $c$ and also $d$ as highlighted in the listed below layout :

Here are a couple of restraints

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

$a$ and also $b$ have to be vertical to $d$ sector.

An additional problem is that the the round fields have to touch among the lengthy line sector (the leading line sector in this instance), base upon an additional lengthy sector (all-time low line sector in this instance) and also have to not head out from it.

What is the algorithm/equation that permits me to create all the round fields that

1. Touch among the line sectors
2. Won't head out from it
3. Fill the bounding box (as specified by $a$, $b$, $c$ and also $d$) as compactly as feasible?
0
2019-12-02 02:47:45
Source Share