# Distance between two parametric curves

I have two parametric planar curves.

The curves are not self-intersecting.

Curve $C_0$ is inside $C_1$.

With $t \in [0..1]$

$C_0:x = f_0(t); y = g_0(t)$

$C_1:x = f_1(t); y = g_1(t)$

Now I'm interested by the surface between theses two curves.

$Surf(d,t) = \{(d*f_0(t)+(1-d)*f_1(t); d*g_0(t)+(1-d)*g_1(t)) (t,d) \in [0..1]^2\}$.

I would like to compute the couple $(d(a,b),t(a,b))$ for every point $P(a,b)$ inside $C_1$ (the outer curve), and outside $C_0$,

My goal is to generate a gradient along each segment joining the two curves.

-
I don't believe your definition of the surface will necessarily be strictly between/on the two curves, even if both curves respectively bound convex regions. (Also, by segment do you mean the curve you get by fixing $d$ and letting $t$ vary?) –  anon Mar 27 '12 at 14:21
I second anon's statement. You will even end up with different sets if you change, e.g., the parametrization of, say, $C_1$. It is also in general not true that the region between two such curves can be covered at all by straight lines connecting the curves. –  user20266 Mar 27 '12 at 14:39
By segment, I mean fixing $t$ (same parameter on both curves) and letting $d$ vary. –  Antoine Lecaille Mar 27 '12 at 14:41
Yes, I got that. –  user20266 Mar 27 '12 at 14:43