How to scale a group of polygons proportionally to each other

33 Views Asked by At

I have a number of polygons which I want to scale between two limits, let's say 0 and 1 for simplicity. The polygons can have different shapes and areas. Always for the sake of simplification, we can take them as bounding boxes, so they're all rectangles.

enter image description here

I'd like to limit the scale of each polygon in relation to the others. As an example, I go on rescaling each poly in the picture from 0 to 1. Now the first poly in the picture is going to increase less than, say, the fourth one which, being the smallest, will incur the biggest scaling. I want rect 4 to increase no more than rect 1 increase, or which is the least among all them. Hence my question:

How do I calculate a common ratio that allows me to control the scaling of this group of polys, so they mantain the same scaling increase proportion, irrespective of their number and sizes?

In short I want polys to scale limited to the lowest proportional increase, so if poly1 scales 2x and poly4 scales 4x, I want poly4 to scale 2x only. Thank you