0
$\begingroup$

What we know:

I have a rectangle with a given Width and Height: enter image description here

Inside that rectangle, I want to fit an ellipse sector, with a known "Start angle" and "Sweep angle." Some contrived, random examples: enter image description here

The question:

Given the Width and Height of the rectangle, and given the 'start angle' and 'sweep angle' of the sector, how do I determine the largest RadiusX and RadiusY values of the resulting sector which will completely fit inside the rectangle? enter image description here

How do I solve for Radius X and Radius Y?

BONUS: How do I calculate the X/Y coordinates for the origin of the ellipse, as it fits inside the rectangle?

$\endgroup$
  • $\begingroup$ Your "start angle" and "sweep angle" are they the real angles formed by the sides of the sector, or they are rather referred to a circle? $\endgroup$ – Aretino May 2 '16 at 16:52
  • $\begingroup$ I'm not sure I understand your question. The five examples above are just 5 random examples, which show an ellipse sector with the given 'begin' angle and 'sweep' angle length. $\endgroup$ – BTownTKD May 2 '16 at 18:08
  • $\begingroup$ In the picture below, your sweep angle for the ellipse on the right is 129° or 100°? [Picture] (i.stack.imgur.com/fdrRM.png) $\endgroup$ – Aretino May 2 '16 at 18:36
  • $\begingroup$ I think I see. By "sweep angle" I refer to the degree of rotation, clockwise, starting from the start angle. $\endgroup$ – BTownTKD May 3 '16 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.