Chain Rule -- this needs some touching up....
MAT329
Andy Long, Spring, 2016

(* We start by defining f(x,y): *)
f[x_,y_]:=Sin[x]y^2
{xmin,xmax,ymin,ymax,zmin,zmax}={-3,3,-3,3,-10,10};
(* Set the plotting region *)
RA={{xmin,xmax},{ymin,ymax}};
RC={{xmin,xmax},{zmin,zmax}};
(* Then we define the parametric curve in the plane that x and y follow as t varies: *)
h[t_]:=Sin[t]
k[t_]:=Cos[t]
tmin=0
tmax=2Pi
(* The function f's surface won't change in the following, so we can define it outside the Manipulate command: *)
Plot1=Plot3D[f[x,y],{x,xmin,xmax},{y,ymin, ymax},AxesLabel->Automatic,BoxRatios->{1,1,1.2},ViewPoint->Front];
Manipulate[
PlotA=ParametricPlot[{h[t],k[t]},{t,b,c},AxesOrigin->{0,0},PlotRange->RA];
PlotB=ContourPlot[f[x,y],{x,xmin,xmax},{y,ymin,ymax},PlotRange->RA];
(* Here's the slice along the surface: *)
PlotD=ParametricPlot3D[{h[t],k[t],f[h[t],k[t]]},{t,b,c}];
{Show[Plot1,PlotD],Show[PlotB,PlotA]}
,{{b,tmin,"Initial Time"},tmin, tmax} 
,{{c,tmin,"Final Time"},tmin, tmax} 
]