Calculate original coordinates of corner before rotation

I would like calculate the original coordinates of the top left corner of a rectangle before rotation and coordinates of center point use for rotation (axis).

My data :

  • Degrees of rotation
  • Coordinates after rotation (x,y)
  • Dimensions (width, height)

> Example

The rotated rectangle is in green, the original is in blue.

The result should be like this : original coordinates : (50,70), axis coordinates : (100,110)

I trying multiples scripts (C# or JS) but impossible to find the good coordinates.

  • Please post what you tried & how it came up short.

    – 

Leave a Comment