Ken's comments are a good starting point. You can take the tangent, the inverse of the diagonal of the diagonal, and add degrees rotated to find the angle between the diagonal and the side.
m = (y3-y1)/(x3-x1) diag_angle = arctan(m) diag_angle_adjusted = diag_angle + rotation
This will give you the angle between the diagonal and the lower left side. Then you can use the distance formula to get the length of the diagonal.
diag_length = (y3 - y1)^2 + (x3-x1)^2
To find the length of the lower left, you must use the cos formula, and for the lower right, you must use sin.
bot_left = diag_length*cos(diag_angle_adjusted)
This will allow you to get the lengths of the sides and go on to calculate the other x and y. For instance,
sin(rotation) = (y2 - y4)/bot_left
After solving for y4, its pretty easy to solve for x4 using cos.
I answer from my phone and have not officially tested this, but this approach should work. I hope tomorrow I will have time to draw an answer if this is not clear.
Good luck And make sure your signs are correct for rotation.
source share