6

I want to obtain the ellipse inscribed in the irregular quadrilateral (no parallel sides) defined by the four points A, B, C, D.

enter image description here

I summarize the ideas given in the comments and answers:

  1. The is not an unique ellipse inside the given quadrilateral.
  2. For the unit square, there are infinite ellipses inscribed into it, with different eccentricities
  3. You cannot transform the unit square into a irregular quadrilateral using linear transformations, as those transform only two vectors into other two vectors. In this case we need to transform 4 vectors.

As shown in this figure:

enter image description here

Increasing the eccentricity, decreases the area. So the problem can be reduced to obtain the maximum area ellipse inscribed into the quadrilateral.

Msegade
  • 927
  • If ABCD is meant to be a trapezoid, which pair of lines are parallel? – David Quinn Feb 15 '22 at 12:47
  • @DavidQuinn I mean a quadrilateral without parallel lines. https://en.wikipedia.org/wiki/Trapezium I was not aware that in some countries, a trapezium implies a pair of parallel sides – Msegade Feb 15 '22 at 12:53
  • If you manage to find a perspective https://en.wikipedia.org/wiki/Perspective_(geometry) to transform ABCD into a square, then the ellipse will become a circle inscribed in the square. Then the transformation back will let you find tangency point of the ellipse sought to the ABCD quadrilateral's sides. Hopefully that would be enough to construct the ellipse. – CiaPan Feb 15 '22 at 13:06
  • 1
    For a given quadrilateral, why would such an ellipse be unique? – David Quinn Feb 15 '22 at 13:08
  • @CiaPan That looks interesting, but finding that perspective does not seem trivial. – Msegade Feb 15 '22 at 13:26
  • @DavidQuinn I do not know how to prove it. But, intuitively, and based on CiaPan answer, only one circunference exist inscribed in the unit square. Any perspective of that square would give a unique ellipse as well. – Msegade Feb 15 '22 at 13:32
  • Hopefully this Quora answer may be of some use for you: https://www.quora.com/How-can-I-draw-this-in-the-2-point-perspective-https-i-ytimg-com-vi-cmBxUPbsXGQ-maxresdefault-jpg It is about converting a planar drawing into perspective view of the 2D base, and then building a perspective view of the 3D solid. However, the lower 2/3 of diagram (together with the topmost horizon line) may be helpful in reconstructing 2D orthogonal view from 2D perspective view.... Disclaimer: I'm just guessing. I haven't tried that myself. – CiaPan Feb 15 '22 at 14:32
  • (contd.) Of course, the horizon line is determined by two intersection points of "parallel" side lines, that is, in the presented case, AC with BD and AB with CD. – CiaPan Feb 15 '22 at 14:34
  • You may also want to see this article Leonardo da Vinci’s The Last Supper: Reconstruction of the Room Using Reverse Geometric Perspective Processes in the Journal of Applied Mathematics and Physics (here the PDF version) for some hints. – CiaPan Feb 15 '22 at 14:36
  • Thanks for the information @CiaPan – Msegade Feb 15 '22 at 15:30
  • 2
    As @DavidQuinn shows in the answer the ellipse you seek is not unique. This corresponds to the ellipse in a square not necessarily being a circle – it can be any shape (eccentricity) ellipse with axes collinear with diagonals of the square. – CiaPan Feb 15 '22 at 15:46
  • @CiaPan You are right, I suppose the problem has to be redefined to add an additional condition – Msegade Feb 15 '22 at 15:53
  • @CiaPan I'm pretty sure that you need more than just a perspective transform -- a parallelogram can't be obtained from a square just using a perspective transform. – Dave Feb 15 '22 at 21:40
  • 1
    @Dave If the quadrilateral is a parallelogram then you simply use a linear transformation instead of perspective. – David K Feb 16 '22 at 01:25

4 Answers4

8
  • There is unique inscribed ellipse of a convex pentagon (dual case for $5$ points defining a conic). There are one and two degrees of freedom of drawing an inscribed ellipse in a (convex) quadrilateral and triangle respectively.

  • By means of skew transformation, we can transform an irregular quarilateral (convex but not parallelogram) into one with one pair of opposite sides are perpendicular.

$$(x',y')=(x+y\cos \omega,y\sin \omega)$$

  • Taking the vertices as $A(a,0)$, $B(b,0)$, $C(0,c)$ and $D(0,d)$ where $ab>0$, $cd>0$ and $(a-b)(d-c)>0$.

  • The two extreme cases are the ellipse degenerates into the diagonals.

  • Construct a family of conics touching with the axes with parameter $k$:

$$ \left[ k\left( \frac{x}{a}+\frac{y}{c} \right)+ (1-k)\left( \frac{x}{b}+\frac{y}{d} \right)-1 \right]^2=\lambda x y \tag{$\star$} $$

  • Using a discriminant to check tangency for $\frac{x}{a}+\frac{y}{d}=1$ or $\frac{x}{b}+\frac{y}{c}=1$, we can solve for $\lambda$.

$$\lambda=4k(1-k) \left( \frac{1}{a}-\frac{1}{b} \right) \left( \frac{1}{d}-\frac{1}{c} \right)$$

  • For ellipse,

$$4k(1-k) \left( \frac{1}{a}-\dfrac{1}{b} \right) \left( \frac{1}{d}-\dfrac{1}{c} \right) \left( \frac{k}{ac}+\frac{1-k}{bd} \right)>0 \implies k\in (0,1) $$

  • The centre of the ellipse lies on the Newton line which is the line joining the mid-points of the diagonals.

$$\text{centre}=\frac{ \left( \dfrac{k}{c}+\dfrac{1-k}{d},\dfrac{k}{a}+\dfrac{1-k}{b} \right)}{2 \left( \dfrac{k}{ac}+\dfrac{1-k}{bd} \right)}$$

  • See also another post of mine for the case of triangle here.

  • An illustration of a tangential quadrilateral. Note on the circular case at $k=0.6$:

enter image description here

Addendum

  • To generalize to any kind of convex quadrilateral, we may use the skew axes as the diagonals. Now taking the vertices as $A(a,0)$, $B(0,b)$, $C(c,0)$ and $D(0,d)$ where $ac<0$ and $bd<0$.

  • In tangential coordinates $(X,Y)$, tangent line $\frac{x}{a}+\frac{y}{b}=1$ can be written as $$Xx+Yy+1=0$$

  • Hence, the dual conic will pass through a "rectangle" with vectices $(-\frac{1}{a},-\frac{1}{b})$, $(-\frac{1}{c},-\frac{1}{b})$, $(-\frac{1}{c},-\frac{1}{d})$ and $(-\frac{1}{a},-\frac{1}{d})$, that is

$$\lambda (aX+1)(cX+1)+\mu (bY+1)(dY+1)=0$$

  • Let $(\lambda,\mu) \propto (1-k,k)$, the inscribed ellipse is

$$\det \begin{pmatrix} 0 & x & y & 1 \\ x & \lambda ac & 0 & \frac{\lambda (a+c)}{2} \\ y & 0 & \mu bd & \frac{\mu (b+d)}{2} \\ 1 &\frac{\lambda (a+c)}{2} & \frac{\mu (b+d)}{2} & \lambda+\mu \end{pmatrix}=0$$

  • The centre divides the Newton line, from $(0, \frac{b+d}{2})$ to $(\frac{a+c}{2},0)$ internally with ratio $\lambda:\mu$

  • Illustration of dual conics pair:

enter image description here

enter image description here

Ng Chung Tak
  • 18,990
  • Thanks, very ellaborate answer. Where is the family of conics expression coming from? – Msegade Feb 16 '22 at 15:11
  • 2
    Firstly, there're quite a lot of old classics for analytic geometry. Some are out of print and were scanned and uploaded to internet. Anyways, everything start with intercept form, namely $$A(x-\alpha)(x-\beta)+B(y-\gamma)(y-\delta)+2hxy=0$$ Allowing double roots and further rearrange gives $$\left( \frac{x}{a}+\frac{y}{b}-1 \right)^2=\frac{2\lambda x y}{ab}$$ It's common approach by rearranging wisely in more trivial or intuitive manner. – Ng Chung Tak Feb 17 '22 at 03:07
  • 1
    See more in another posts of mine here and here. – Ng Chung Tak Feb 17 '22 at 03:08
  • 1
    Actually, for the very first equation $(\star)$, I jumped some steps by observing the two limiting cases. The orginal form of equation could be written as $$(\alpha x+\beta y-1)^2=\lambda x y$$ Some work were saved. – Ng Chung Tak Feb 17 '22 at 03:24
6

As explained in this answer, once you choose one of the tangency points the other three can be uniquely constructed from the properties of the perspective transformation carrying the quadrilateral to a square.

If you want, in particular, the ellipse corresponding to the circle inscribed into the square, then the construction is very simple (see figure below): join the intersection point $O$ of the diagonals with the concurrence points $E$, $F$ of the opposite sides: lines $EO$ and $FO$ intersect the sides of quadrilateral $ABCD$ at tangency points $PQRS$.

One can then find the centre $M$ of the ellipse as the intersection of lines $DK$, $CL$, where $K$, $L$ are the midpoints of $QR$, $PQ$. If you need to find the equation of the ellipse, you can construct a fifth point $Q'$ as the reflection of $Q$ about $M$. Otherwise, you can use geometric techniques to find axes and foci.

enter image description here

Intelligenti pauca
  • 50,470
  • 4
  • 42
  • 77
  • That is a very straightforward method. Can you explain why joining O with E and F gives the tangent points? – Msegade Feb 16 '22 at 15:02
  • 1
    @Msegade It's all explained in the linked answer: a circle inscribed into a square is tangent at the midpoints of the sides. A line through one of these midpoints, parallel to the other sides, intersects the diagonals of the square at their intersection point $O$. But parallel lines become concurring after a perspective transformation, whence the above construction. – Intelligenti pauca Feb 16 '22 at 15:16
  • 1
    @Msegade In other words: in the square line $POR$ is parallel to $CD$ and $AB$, hence in the transformed quadrilateral the same lines are concurrent. Ditto for line $QOS$ with $BC$ and $AD$. – Intelligenti pauca Feb 16 '22 at 15:49
  • Thanks, it is clear now. – Msegade Feb 16 '22 at 15:50
  • Note that this is not necessarily the ellipse of maximum area. (I think in general it is not.) But this is the ellipse I would have preferred to construct if I still had a degree of freedom. – David K Feb 16 '22 at 16:56
  • @DavidK Right: this isn't, in general, the ellipse of maximum area. I gave an example here. – Intelligenti pauca Feb 16 '22 at 19:05
4

A linear transformation may not exist between your quadrilateral and the unit square. There exists a unique linear transformation that sends two given vectors to two other vectors. so the other two position vectors of the quadrilateral may not transform accordingly. An interesting question, note that the ellipse is simply a stretching of the circle by some factor.

2

The general equation of an ellipse can be written as $$x^2+Axy+By^2+Cx+Dy+E=0$$ (assuming $A^2<4B$)

So there are five unknown coefficients.

Each tangent line is of the form $y=mx+c$. Solving each simultaneously with the conic gives a quadratic equation in $x$ which must have double roots.

So you will have only four equations in the five unknowns $A, B, C,D$ and $E$, and this would suggest infinitely many possible ellipses can be inscribed in the quadrilateral.

So you wouldn't be able to find a unique ellipse without applying some additional constraint.

David Quinn
  • 34,121