in the above image I have shown two rectangles
- rectangle 1 whose x can vary from -900 to 13700 and Y can vary from -600 to 6458
- rectangle 2 whose coordinate X can vary from 0 to 3000 and y can vary from 0 to 2000
Also: rectangle 2 has its starting point at left top position(0,0) whereas rectangle 1 has starting point( width/2, height/2).
What I need to do: to convert a point of rectangle 1 to point of rectangle 2 using scaling or translation.
So, what should be scaling factor for x
and y
coordinates in order to transform the coordinate of rectangle 1 to rectangle 2?