If you give your ellipse the same aspect ratio as the rectangle, you can work on the basis that what you want is a circle enclosing a square then stretched as if you've transformed the square into the required rectangle.
For a square with half side length = 1, the radius of the circle would be sqrt(2).
So, sweeping theta from 0 - 360', the ellipse's coordinate points will be:
- x = cos(theta) * sqrt(2) * rect.width + x.center;
- y = sin(theta) * sqrt(2) * rect.height + y.center;
where rect.width and rect.height are the half widths of the relevant sides.