3

There is one point designated for each side of the quadrilateral. The ellipse is contained within the quadrilateral.

I am curious about this because when using linear perspective to plot ellipses in my drawings I first make quadrilaterals, then deduce the tangent points, then plot the ellipse. It would be nice to have some way of checking those tangent points to make sure they are valid.

Take for example the image below, given points E,F,G, & H on the convex quadrilateral ABCD I don't see a way to construct an ellipse that is tangent to all those points. Is there a formulaic/algorithmic way of knowing if a given set of points can/cannot construct an ellipse on a given quadrilateral without trial and error (In an app like GeoGebra)?

enter image description here

Audus
  • 383
  • 1
    This suggests that you only need to solve this problem in the case of a square: https://math.stackexchange.com/a/3067053/54092 – Elle Najt Sep 11 '20 at 05:54
  • Are you suggesting there are only one set of valid tangent points for a given (convex) quadrilateral? – Audus Sep 11 '20 at 05:57
  • No, it seems to be the case that there is an interval of such ellipses. I mean the following: Work in the case of a square $S$ and fix a side interval L. My guess, based on playing with this https://www.geogebra.org/m/d4k6SjFX , is that for each $x \in L$, there is a unique ellipse tangentially inscribed inside of of $S$ that contains $x$. I think I can prove this existence, but am not sure about uniqueness. – Elle Najt Sep 11 '20 at 06:52
  • If you give four tangents, then you can choose at will ONE point on the ellipse, lying inside the convex quadrilateral formed by the tangents (but not at its vertices). In general, five conditions (points or tangents) define a conic section. – Intelligenti pauca Sep 11 '20 at 09:19
  • Tangent points you get from a perspective transformation of a circle into a square are automatically the right ones. But the ellipse you get is only a special case among an infinite number of ellipses which can be inscribed into the quadrilateral resulting from the square. – Intelligenti pauca Sep 11 '20 at 09:26
  • You should give a link to at least one of the 3 previous connected questions of yours asked in the past 48 hours, for example this one – Jean Marie Sep 11 '20 at 16:04
  • @Intelligentipauca Doesn't the condition that the conic is tangent to a line define a quadric hypersurface in the parameter space of conics? The dimension counting works out, but what guarantees that they intersect in a single point? (As opposed to $2^4$ points by Bezouts.) For instance, there can be 2 ellipses passing through 4 points tangent to one line, as in example 3.2 here: https://www.maa.org/sites/default/files/images/upload_library/22/Ford/Bashelor.pdf ... and by duality there should generically be 2 conics tangent to 4 lines passing through a single point. – Elle Najt Sep 11 '20 at 20:02
  • Maybe there's some way to eliminate that extra conic? It might have a simple description in terms of the ellipse you can generate with the 4 tangency + 1 point conditions. I guess it could also be a double point in the intersection -- the four sides of the square aren't in general position... (Also, you get a whole one parameter family of such ellipses from the transformation into the square, as you move the point around.) – Elle Najt Sep 11 '20 at 20:04
  • @Audus -- if you just want a condition to test whether four given points lie on such a conic ... I think the following works: Each point defines a linear constraint in the space of conics. Four of them should (generically) cut you down to a line. A single tangency constraint is a quadratic constraint on the parameter space, which turns into a quadratic equation in a single variable after making substitutions from all the linear constraints. Solving this equation gives you at most 2 candidate conics, and you can test each to see if it is an ellipse inscribed in your quadrilateral. – Elle Najt Sep 11 '20 at 20:13
  • @LorenzoNajt You are right: there are, in general, two solutions for a conic tangent to four lines and passing through a given point. To have a single conic you must choose the point as a tangency point, lying on one of the four sides of the quadrilateral. – Intelligenti pauca Sep 11 '20 at 20:57
  • @Intelligentipauca Interesting, thanks. It seems like that would prove that there is a unique such ellipse once you fix one of the intersection points with the boundary of the square. I think I see why -- the condition that a conic intersects a line tangentially at a particular point is a linear condition. For instance it's a condition about the vanishing of the derivative of the quadratic you get by restriction to that line. – Elle Najt Sep 11 '20 at 21:13

2 Answers2

8

Any convex quadrilateral can be mapped to a square by a suitable perspective transformation, and an ellipse inscribed into the quadrilateral is then mapped to an ellipse inscribed into the square, having then its axes along the diagonals of the square (see figure below).

In this case, lines through tangency points $P$ and $R$, parallel to sides $CD$ and $BC$ respectively, intersect diagonal $AC$ at the same point $V$. Moreover, tangency points $P$, $Q$ are aligned with the centre $O$ of the square, and the same goes for the other two tangency points $R$ and $S$.

enter image description here

As perspective transformations preserve collinearity of points, these properties of tangency points can be reinterpreted for the case of an ellipse inscribed into a generic convex quadrilateral (see figure below).

Lines $CD$, $AB$, $PV$ are now concurring, and the same happens for lines $BC$, $AD$, $RV$. Points $POQ$ are aligned, as well as $ROS$. It follows that once we fix a tangency point, the other ones are uniquely determined by these properties.

enter image description here

Intelligenti pauca
  • 50,470
  • 4
  • 42
  • 77
  • Thank you for posting diagrams. I understand the basic concept of projecting the forms to a square to check the properties. – Audus Sep 14 '20 at 01:29
  • Can you help me find a reference for this? I cannot cite this site as reference, and I wasn't able to find a proper reference for this. – Vue Mar 04 '23 at 09:30
  • @Vue The only reference I can give is for the existence of the perspective transformation: Dörrie, 100 Great Problems of Elementary Mathematics, problem 72. – Intelligenti pauca Mar 04 '23 at 16:12
2

As mentioned in the comments, you can apply a projective transformation and turn the quadrilateral into a square. This works because if you hit an ellipse with a projective transformations that keeps it bounded it remains an ellipse. So we deal with that case from now on.

Let the four sides of $S$ be denoted $S_R, S_L,S_T, S_B$, with subscript standing for right, left, top, bottom. Let's assume that $S_B$ is the $x$-axis; this will be notationally convenient later.

The question is : given $p_i \in S_i$, $i \in \{R,L,T,S\}$, is there an inscribed ellipse tangent to the four sides at the $p_i$?

An algorithm to decide this equation (and produce the ellipse if it exists) is sketched below. The moral of the story is that it is a linear algebra problem.

An ellipse $E$ has a general formula: $$a x^2 + by^2 + c xy + dx + ey + f= 0.$$

If we assume $f \not = 0$, we can normalize it to $1$. (You can avoid this annoying case analysis with projective coordinates.) Let's assume we are in this case, and I'll leave the other case to you, so the equation is:

$$a x^2 + by^2 + c xy + dx + ey + 1= 0.$$

Note that there are 5 variables here, so we have a five dimensional vector space with coordinates $(a,b,c,d,e)$.

Consider the point $p_i = (x_i, y_i)$. If $p_i \in E$, then $a x_i^2 + by_i^2 + c x_iy_i + dx_i + ey_i + 1 = 0.$ The $x_i, y_i$ are fixed numbers, so this is a linear equation in the variables $(a,b,c,d,e)$.

We get four such equations. The set of solutions to them will be a line(see footnote (*) ), which you can compute with linear algebra.

We now examine the condition that $E$ is tangent to the base of the square, namely the $x$-axis. The $x$-axis is defined by the equation $y = 0$, so the equation defining $E$ becomes $q(x) = ax^2 + dx + 1 = 0$ when we restrict to the $x$-axis.

One way to proceed from here is to use the fact that this quadratic is tangent to the $x$-axis iff the quadratic $q$ has a double root, which happens iff the discriminant vanishes, i.e. $d^2 - 4a = 0$. However, this is wasteful, since we have additional information; in particular, we know that $q(x)$ must touch tangentially at the particular point $p_B$. In particular, we want the derivative of $q$ to vanish at $x_B$.

So, we get one more condition, namely $q'(x) = 2a x + b$ vanishes at $x_B$, or $2ax_B + b = 0$.

This gives us five equations in general, cutting us down to a single conic, which might be your desired ellipse. To see whether corresponds to your ellipse, you can:

  1. Test if it is an ellipse by (symbolically) completing the square.
  2. Test each one against the 3 other tangency conditions.
  3. You can also make sure that it is on the right side of all 4 lines by checking the ellipse restricted to each of the four sides gives a quadratic with the correct sign in front of the quadratic term.

If the conic passes these tests, it is a solution to your problem. Otherwise, there is no solution with specification the given $p_i$.

I think these tests are likely to be redundant. In particular, I think an ellipse tangent to the four intervals must lie inside it, so you can probably eliminate the third condition.

(*) You can prove, I think, that the conditions do not conspire and become linearly dependent for bad choices of points. Fix your $p_i$. Then there is conic passing through $p_L$ but not $p_B$. Also, there is a conic passing through $p_L$ and $p_B$, but not $p_R$. Finally, there is a conic passing through $p_L, p_B, p_R$ but not $p_U$. I didn't formally verify these statements, just did some doodles with parabolas and circles, so I'd double check this point. I think the same is true regarding imposing the final linear condition that one of these intersections is tangential.

If this is correct, then each time you add one of these conditions you necessarily eliminate some conics, meaning that the dimension of the space drops when you impose the new constraint.

A more algebraic and believable argument would be to explicitly construct equations a sequence of conics achieving each of these intermediate conditions.

Remark I believe the following is true: For each $x \in S_B$ there is a unique ellipse tangentially inscribed in $S$ that contains $x$, provided $x$ is not at a corner. So, there is actually an interval of ellipses satisfying you constraints. I'm not sure about this though. I think that via projective duality the above argument would give uniqueness. I convinced myself of existence through a half backed argument about inflating an ellipse passing through $x$ and the antipode of $x$ around the midpoint of the square, but I'm not sure if it can be easily formalized.

Elle Najt
  • 20,740