def find_r_to_boundary_of_closedpath(inside_closedpath, xy, cos_t, sin_t, rmin=0.0, rmax=1.0, tolerence=0.01):
 (cx, cy) = xy
 def _f(r):
  return (((cos_t * r) + cx), ((sin_t * r) + cy))
 find_bezier_t_intersecting_with_closedpath(_f, inside_closedpath, t0=rmin, t1=rmax, tolerence=tolerence)

def find_r_to_boundary_of_closedpath ( inside_closedpath , xy , cos_t , sin_t , rmin = 0.0 , rmax = 1.0 , tolerence = 0.01 ) : ( cx , cy ) = xy def _f ( r ) : return ( ( ( cos_t * r ) + cx ) , ( ( sin_t * r ) + cy ) ) find_bezier_t_intersecting_with_closedpath ( _f , inside_closedpath , t0 = rmin , t1 = rmax , tolerence = tolerence )
find a radius r between *rmin* and *rmax* at which it intersect with the path .