Can someone give me an algorithm that finds the position of all four corners of a rectangle if I know its center point(in global coordinate space), width and height, and its
Top right corner has coordinates w/2, h/2 relative to the center. After rotation its absolute coordinates are
x = cx + w/2 * Cos(Phi) - h/2 * Sin(Phi) y = cy + w/2 * Sin(Phi) + h/2 * Cos(Phi)