How to calculate center of rectangle? Info available is rectangle's width and length and bottom left corner coordinate and angle theta between x-axis and the line from bottom left corner to bottom right corner.
ie: bottom left corner coordinate is (100,900), width is 800, height is 600, theta is 1 degree. What is the center coordinate?
method I tried is
- find the other 3 corner coordinates assuming the rectangle is aligned to x-axis
- calculate the center coordinate of the axis aligned rectangle
- rotate the center coordinate back by angle theta using the bottom left corner as origin.
This however doesn't seem to work. Any help appreciated.