I have a rectangle in geometric plane defined with x,y coordinates of 4 points (ABCD). Now one point (C) is moved to new x,y location and consequence is resizing of rectangle in a way that diagonal opposed point (A) remains still (stationary) but two neighboring points (BD) of the rectangle must be appropriately recalculated to maintain rectangular shape. Calculating is simple if rectangle is not rotated, but how to calculate points if rectangle is rotated.... for example 31 degrees ?

