- #1
aheight
- 321
- 109
Summary:: Questions about finding largest ellipse in polygon
Was wondering if someone could help me understand two concepts involved with finding largest ellipse in a polygon? Some background:
First, I set up a set of half-plane representations for the example polygon below and as you can see my ellipse is not fitting too well in the polygon:
$$
\mathcal{P}=\begin{cases}
\begin{aligned}
-x+y&\leq 5/2 \\
-1/6x+y&\leq 5/6 \\
2 x+y&\leq 3 \\
-1/10x-y&\leq 4/5
\end{aligned}
\end{cases}
$$
or in matrix form:
$$
\begin{bmatrix}
-1 & 1 \\
-1/6 & 1\\
2 & 1 \\
-1/10& -1
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix}
\leq
\begin{bmatrix}
5/2 \\
5/6 \\
3 \\
4/5
\end{bmatrix}
$$
or
$$\textbf{Ax}\leq\textbf{b}
$$
Next, I represent the ellipse with an affine transformation using a symmetric definite matrix:
$$
\mathcal{E}=\{(x,y): x=\textbf{C}u+d
$$
or:
$$
\begin{bmatrix}
x \\
y
\end{bmatrix}
=\begin{bmatrix}
c & d\\
d & f
\end{bmatrix}
\begin{bmatrix}
\cos(t) \\
\sin(t)
\end{bmatrix}
+\begin{bmatrix}
a \\
b
\end{bmatrix}
$$
I don't understand the following:
(1) According to the Python reference Python link to John-ellipsoid, in order for the ellipse to be inside the polygon or ##\mathcal{E}\subset \mathcal{P}##, we must have ##\textbf{A}(\textbf{C}u+d)\leq b##.
(2) According to the Matheamtica reference (under Geometry applications) ConicOptimication in Mathematica, to maximize the area is equivalent to minimizing ##-\log(\text{Det}\textbf{C})## which is equivalent to minimizing ##-\text{Tr}(\textbf{C})##.
Would like to understand how (1) assures the ellipse is in the polygon and how (2) maximizes it's size and was hoping someone could help me.
Thanks!
[Moderator's note: Moved from a technical forum and thus no template.]
Was wondering if someone could help me understand two concepts involved with finding largest ellipse in a polygon? Some background:
First, I set up a set of half-plane representations for the example polygon below and as you can see my ellipse is not fitting too well in the polygon:
$$
\mathcal{P}=\begin{cases}
\begin{aligned}
-x+y&\leq 5/2 \\
-1/6x+y&\leq 5/6 \\
2 x+y&\leq 3 \\
-1/10x-y&\leq 4/5
\end{aligned}
\end{cases}
$$
or in matrix form:
$$
\begin{bmatrix}
-1 & 1 \\
-1/6 & 1\\
2 & 1 \\
-1/10& -1
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix}
\leq
\begin{bmatrix}
5/2 \\
5/6 \\
3 \\
4/5
\end{bmatrix}
$$
or
$$\textbf{Ax}\leq\textbf{b}
$$
Next, I represent the ellipse with an affine transformation using a symmetric definite matrix:
$$
\mathcal{E}=\{(x,y): x=\textbf{C}u+d
$$
or:
$$
\begin{bmatrix}
x \\
y
\end{bmatrix}
=\begin{bmatrix}
c & d\\
d & f
\end{bmatrix}
\begin{bmatrix}
\cos(t) \\
\sin(t)
\end{bmatrix}
+\begin{bmatrix}
a \\
b
\end{bmatrix}
$$
I don't understand the following:
(1) According to the Python reference Python link to John-ellipsoid, in order for the ellipse to be inside the polygon or ##\mathcal{E}\subset \mathcal{P}##, we must have ##\textbf{A}(\textbf{C}u+d)\leq b##.
(2) According to the Matheamtica reference (under Geometry applications) ConicOptimication in Mathematica, to maximize the area is equivalent to minimizing ##-\log(\text{Det}\textbf{C})## which is equivalent to minimizing ##-\text{Tr}(\textbf{C})##.
Would like to understand how (1) assures the ellipse is in the polygon and how (2) maximizes it's size and was hoping someone could help me.
Thanks!
[Moderator's note: Moved from a technical forum and thus no template.]
Attachments
Last edited by a moderator: