How it Works

1. The Grid Shift: Instead of moving the square, we use translate(200, 200). This moves the "pin" (the 0,0 origin) from the corner to the center.
2. The Rotation: rotate() turns the entire coordinate grid like a steering wheel. We convert degrees to Radians using Math.PI / 180.
3. The -HalfSize Trick: By drawing the box at -halfSize, we shift the square so its center point stays on the pin. Without this, it would spin around its corner!
4. Save & Restore: We use save() before we move things and restore() after. This "resets" the grid so the next frame starts fresh.