Geometry: Distance from the point in R3 to a surface defined by a parametric curve and a radio function?

I am interested in studying the class surfaces defined by:

  1. Take an arbitrary parametric curve f: {0..1} -> ℝ3.

  2. Choose an arbitrary radio function r: {0..1} -> ℝ.

  3. A point P in ℝ3 is part of this surface if, for some t, dist (f (t), p) = r (t).

Where dist It is the usual vector distance function. dist (a, b) = (b - a) · (b - a).

I will call that type of surface a tube for lack of a better name. Given a tuple (f, r) representing a tube and a point P in ℝ3, there is a function D ((f, r), p) which returns the minimum distance between P and any point in (f, r)?