Formula for ellipse with two tangents intersecting with two points Assume that I have four points $P_1, P_2, P_3, P_4$.  These points lie on the 2d plane and take the form $P_i = (x_i, y_i)$
Assume that I define line $L_{ij}$ as the line passing through $P_i$ and $P_j$.
How do I find the coefficients $a$ and $b$ in the equation for an ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ such that the ellipse passes through points $P_2$ and $P_3$ AND has both tangent lines $L_{12}$ and $L_{34}$?
EDIT: I am using this formula to smooth a graph I'm drawing in python's matplotlib.pyplot.  I have two line segments $L_{12}$ and $L_{34}$ that I need to draw a smooth connection through, and an ellipse seems like a good shape for this.

If you're after an ellipse that passes through 2 points with given tangents at those points then this may be of use to you[1].
[1] Roundest ellipse with specified tangents
