<p>The algorithm used to move monitors to the nearest one in “position dialog” is explained here.</p>
<p>Segment equation is used. Let’s explain segment equation in order to understand the proccess:</p>
<p>If you have two points, <b>p<sub>0</sub></b>, <b>p<sub>1</sub></b>∈ℝ<sup>2</sup>, the equation of straight line between <b>p<sub>0</sub></b> and <b>p<sub>1</sub></b> is: </p>
<p>If <b>v</b> = <b>c<sub>1</sub></b> - <b>c<sub>0</sub></b>, <b>c<sub>0</sub></b> and <b>c<sub>1</sub></b> are monitors centers, the equation between them is <b>r</b> = <b>v</b> · t + <b>c<sub>0</sub></b>.</p>
<p>where t<sub>1</sub> is the parameter of the mentioned equation to get the intersection point with the c<sub>1</sub> monitor.</p>
<p>where t<sub>2</sub> the parameter with the c<sub>0</sub> monitor.</p>
<p>t<sub>1</sub>, t<sub>2</sub>∈ [0,1].</p>
<p>If t<sub>2</sub><t<sub>1</sub>, the monitors are separated, otherwise the monitors are overlapped.</p>
<p>Iff t<sub>2</sub><t<sub>1</sub>, c<sub>0</sub> monitor must be moved, and its displacement is provided by <b>r</b> = <b>r<sub>1</sub></b>-<b>r<sub>2</sub></b></p>