Find the intersections of the line containing the segment and the circle. This amounts to solving a quadratic equation. If there are no intersections (i.e. the solutions of the corresponding equation are non-real), then your segment does not intersect the circle. Now, if there are intersections, see whether they are inside the segment or not.
To implement this, let $P$ and $Q$ be the endpoints of your segment and $C$ and $r$ be the center and the radius of your circle. Then every point of the line through $P$ and $Q$ is given by the formula $$t P + (1-t) Q$$ for exactly one value of $t\in\mathbb R$, and the points in the segment are precisely those for which the corresponding $t$ is in the interval $[0,1]$.
Now the point corresponding to $t\in\mathbb R$ is on the circle if and only if $$\langle t P + (1-t) Q - C,t P + (1-t) Q - C\rangle = r^2,$$ where $\langle\mathord\cdot,\mathord\cdot\rangle$ is the usual inner (dot) product of vectors. If you solve this equation—this is easy, as it is a quadratic equation for $t$—, you find the $t$'s corresponding to the points of intersection of the circle and the line, and if at least one of those $t$'s belong to the interval $[0,1]$, then the segment intersects the circle.
Later: I tried to have Mathematica do the computation for me. Assuming $C=(0,0)$ and $r=1$, as we may up to translation and rescaling, and letting $P=(p1,p2)$, $Q=(q1,q2)$, the following computes the $t$'s:
P = {p1, p2};
Q = {q1, q2};
ts = t /. Solve[Norm[t P + (1 - t) Q]^2 == 1, t];
This ends up with the variable ts having the value
$$\left\{\frac{-p_1 q_1-p_2 q_2-\sqrt{p_1^2
\left(-q_2^2\right)-2 p_1 q_1+2 p_2 p_1 q_1
q_2-p_2^2 q_1^2-2 p_2
q_2+p_1^2+p_2^2+q_1^2+q_2^2}+q_1^2+q_2^2}{-2 p_1
q_1-2 p_2 q_2+p_1^2+p_2^2+q_1^2+q_2^2},\frac{-p_1
q_1-p_2 q_2+\sqrt{p_1^2 \left(-q_2^2\right)-2 p_1
q_1+2 p_2 p_1 q_1 q_2-p_2^2 q_1^2-2 p_2
q_2+p_1^2+p_2^2+q_1^2+q_2^2}+q_1^2+q_2^2}{-2 p_1
q_1-2 p_2 q_2+p_1^2+p_2^2+q_1^2+q_2^2}\right\}$$
(This was a huge formula, which will likely not fit on your browser window...)
If the expression inside the square roots is negative, there are no real $t$'s, so the line (hence, a fortiori the segment) and the circle are disjoint. If not, now we need to see if at least one of the roots in in $[0,1]$.
If I now tell Mma to tell me when then first of the roots is in $[0,1]$, by telling
her to compute
Reduce[0 <= ts[[1]] <= 1, Reals]
it works for a while, and comes up with a huge answer, presumably equivalent to the original
0 <= ts[[1]] <= 1
Can anyone make sense of the huge answer? (if one asks instead for the more meaningful
Reduce[0 <= ts[[1]] <= 1 || 0 <= ts[[2]] <= 1, t, Reals]
the same thing happens)
PS: Please notice that I have made absolutely no attempt at being fast or particularly smart with this idea: it is just the straightforward was to set up the problem and solve it.
Best Answer
Without loss of generality, place the “top” of the ellipse at the origin. Letting $\rho=b/a$, its equation is $$\rho^2x^2+(y+b)^2=b^2.\tag 1$$ If the line $\lambda x+\mu y+\tau=0$ is tangent to this ellipse, the coefficients of that equation must satisfy the dual conic equation $${b^2\over\rho^2}\lambda^2+2b\mu\tau-\tau^2=0.\tag2$$
As drawn, the other end point of the horizontal segment is at $(-R,0)$, so an equation of the other tangent line is $$x\cos\theta-y\sin\theta+R\cos\theta=0.\tag3$$ Substituting into (2), we get after a bit of rearrangement $$\left(\left(\frac{b^2}{\rho^2}-R^2\right)\cos\theta-2Rb\sin\theta\right)\cos\theta = 0.\tag4$$ This is a straightforward quadratic equation in $b$. Once you know $b$, the point of tangency of the line (3) can be found in a variety of ways. Using pole-polar relationships is easiest since we’ve already worked out the dual conic: the pole of a tangent line to a conic is the point of tangency. The pole of the line $\lambda x+\mu y+\tau=0$ can be found by substitution into the dual conic. For the dual conic (2), the homogeneous coordinates of this point work out to be $(b^2\lambda/\rho^2,b\tau,b\mu-\tau)$. Substituting the coefficients from (3) and dehomogenizing yields $$-{\cos\theta \over R\cos\theta+b\sin\theta}\left(b^2/\rho^2,Rb\right).\tag5$$