You need to know when the object is further away from the circle than it's radius. So you need the distance between 2 points, those points being your object and the disc.
FUNCTION distance(obj1,obj2)
xx#=(object position x(obj2)-object position x(obj1))*(object position x(obj2)-object position x(obj1))
yy#=(object position y(obj2)-object position y(obj1))*(object position y(obj2)-object position y(obj1))
zz#=(object position z(obj2)-object position z(obj1))*(object position z(obj2)-object position z(obj1))
distance=sqrt(xx#+yy#+zz#)
ENDFUNCTION distance