增加多边形面积后求多边形内部的坐标值

Find coordinate value inside the polygon after increasing the area of polygon

假设我们有这个 rectangle/square ABCD 并且在其中定义了一个点 E。

现在我们增加这个rectangle/square的面积,现在是这样的:

A -> A`, B -> B`, C -> C`, D -> D`

这里 E`(E -> E` = ?) 的值是多少

如果要保留矩形内的相对位置,则必须提供与调整大小之前相同的每个坐标与宽度和高度的比率

(new_x - new_a_x) / (new_b_x - new_a_x) = (x - a_x) / (b_x - a_x)

所以

new_x  = new_a_x + (new_b_x - new_a_x) * (x - a_x) / (b_x - a_x)

new_y

类似
new_y  = new_a_y + (new_d_y - new_a_y) * (y - a_y) / (d_y - a_y)