|
|
Given two rectangles we can get the minimum squared distance by minimizing the function Q(s0, t0, s1, t1) = |R0(s0, t0) - R1(s1, t1)|^2 with s0, t0, s1 and t1 in [0, 1]. Since we already have a segment-to-rectangle distance algorithm we can simply use that one and get the minimum distance from each edge of the first rectangle to the second rectangle and vice versa.
|
Copyright © by Martin Ecker |