The pass equations are
#{(x=rcostheta),(y=rsintheta):}#
then
#(rcostheta-h)^2+(rsintheta-k)^2 =a^2# or
#r^2-2rhcostheta-2rksintheta+h^2+k^2=a^2# or
#r^2-2r(hcostheta+ksintheta)+h^2+k^2=a^2#
Making now
#h/k=tanphi_0# we have
#r^2-2rk(tanphi_0costheta+sintheta)+h^2+k^2=a^2# or
#r^2-2r(k/cosphi_0) (sinphi_0costheta+cosphi_0sintheta)+h^2+k^2= a^2#
but #cosphi_0=k/sqrt(h^2+k^2)# so
#r^2-2rsqrt(h^2+k^2)(sinphi_0costheta+cosphi_0sintheta)+h^2+k^2=a^2#
Finally
#r^2-2rsqrt(h^2+k^2)sin(theta+phi_0)+h^2+k^2=a^2# or also
#r = sqrt[h^2 + k^2] Sin( theta+phi_0) pm sqrt[
a^2 - h^2 - k^2 + (h^2 + k^2) sin(theta+phi_0)^2]#