How to Find the Minimum Taxicab/Manhattan Distance Between Two Parallel Rectangles?

It all comes down to categorizing the relationship between the two rectangles. I'll assume they don't intersect. In that case only two situations may occur: The 2nd rectangle is located fully in one of four corner sections of the 1st rectangle All other situations In the first case you calculate the Manhatten distance between the two opposing corners (TL-BR,TR-BL,BR-TL,BL-TR) In the second case you take either the difference in x coordinates or the difference in y coordinates of the rectangle sides (B-T,L-R,R-L,T-B) depending on the situation.

This is all very easily tested with a few if or case statements.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions