Given the Sphere
#S -> x^2+y^2+z^2+x-2y+2z-3=0#
and the plane
#Pi_1 -> 2x+2z-3=0# or
#Pi_1-> << p-p_1, vec n >> = 0#
with
#p = (x,y,z)#
#p_1 = (0,0,3/2)#
#vec n = (2,2,0)#
The circle
#C-> S nn Pi_1# is centered at the orthogonal projection of the center of #S# over #Pi_1#
but
#S -> (x+1/2)^2+(y-1)^2+(z+1)^2 = 21/4#
has as center the point #p_0 = (-1/2,1,-1)#
now calling #p_2# the projection of #p_0# onto #Pi_1# we know that #p_2# is at the intersection
#Pi_1 nn L#
with #L-> p = p_0 + lambda vec n# or
#<< p_0-p_1+lambda vec n, vec n >> = 0#
giving #lambda = - (<< p_0-p_1, vec n >>)/norm(vec n)^2# and
#p_2 = p_0-(<< p_0-p_1, vec n >>)/norm(vec n)^2 vec n = (-3/4,3/4,-1)#
now given
#Pi_2 -> ax+by+cz-d=0# or
#Pi_2-> << p-p_3, vec v >> = 0#
with
#vec v = (a,b,c)#
#p_3 = (0,0,d/c)#
we have #p_4# as the projection of #p_2# onto #Pi_2# as
#p_4 = p_2 -(<< p_2-p_3, vec v >> )/norm(vec v)^2 vec v#
and the distance #d = norm(p_2-p_4)# is
#d = 1/4((3a-3b+4(c+d))/sqrt(a^2+b^2+c^2))#