An upright (green) cone with opening angle $2a < \pi/10$ has its vertex at point O with cartesian xyz coordinates $(0,0,0)$. The cone axis (dotted line) lies in the plane $y=0$ and is parallel to the z-axis.
A (blue) sphere of radius $r$ is centred at point $P(P_x,0,P_z)$ which may lie inside or outside the cone.
The line segment connecting points $O,P$ has length $p < r$. Thus point $O$ always lies inside the sphere.
The cone surface and the sphere surface intersect in a non-planar curved line loop which includes points $L1,L2$.
From here I have found equations for the loop (where $c$ is the "cone opening parameter" defined by $c^2=(x^2+y^2)/z^2$) :-
$$ (x-P_x)^2+(y-P_y)^2+\frac{x^2+y^2}{c^2}-\frac{2.P_z}{c}\sqrt{x^2+y^2}+P_z^2=r^2 \qquad [1] $$
$$ x^2\left(1+\frac{1}{c^2}\right)-2P_x.x+y^2\left(1+\frac{1}{c^2} \right) -2P_y.y + (P_x^2+P_y^2+P_z^2-r^2)-\frac{2P_z}{c}\sqrt{x^2+y^2}=0. \qquad [2] $$
In this case the value of $P_y$ is zero which simplifies the above equations a little bit.
QUESTION
What (in steradians) is the solid angle $w$ subtended by the "loop" at point $P$ in terms of $a,r,P_x,P_z$?