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
- Touch one of the line segments
- Won't go out from it
- Fill the bounding box ( as defined by $a$, $b$, $c$ and $d$) as compactly as possible?