This ellipse must be tangent to at least 4 lines and it must intersect the other lines. I've tried to use ellipses that are parallel to the x- and y-axis. I've done this by transforming the equation of this lines into a dual space:
l: px + qy + r = 0 with p2 + q2 = 1
For a fixed ellipse, this can be transformed into:
p2a2 + q2b2 - (px0 + qy0 + r)2 = 0
This has worked, but I'm just wondering how to find an ellipse that isn't parallel to the x- and y-axis in an elegant way. All types of suggestions are welcome.