This is probably an easy question, but I am not capable of solving it. I have two particles which distance of each other is $r$. One particle is inside a box with diameter $d$. Now I want to determine the smallest distance from particle 1 to the box.
Is there an easy way I don't see to do that?
Here is what I mean:
