Question: Contourplot and surface-plot/plot[surfdata] in same plot

I have a surfdata-plot which - by interpolation - goes through different circles with different inclinations with respect to each other. The surface is color-coded with zhue from violet to red. In order to see the valleys behind peaks I would like to have a filled 2D-plot of my zhue-surfdata colors with contours wherever the surface passes z-coordinate integers located somewhere below the surface (e.g. at z=-7). Unfortunately, I haven't found examples of contourplots for surfdata plots so far.

> 

restart

> 

with(plots);

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, graphplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(1)
> 

with(CurveFitting);

[ArrayInterpolation, BSpline, BSplineCurve, Interactive, LeastSquares, PolynomialInterpolation, RationalInterpolation, Spline, ThieleInterpolation]

(2)
> 

R := [30, 32.5, 37.5, 42.5, 47.5, 50]:

> 

incl := [0, .5, 1, -2, 5, 0]:

> 

phases := [0, (1/12)*Pi, (1/8)*Pi, (1/4)*Pi, (1/2)*Pi, 0]:

> 

colors := [grey, black, blue, red, green, grey]:

> 

orbit := [R[j]*cos(t), R[j]*sin(t), incl[j]*cos(t-phases[j])]:

> 

display(seq(spacecurve(orbit, t = 0 .. 2*Pi, color = colors[j], view = [-56 .. 56, -56 .. 56, -15 .. 15], labels = ["x [AU]", "y [AU]", "z [AU]"]), j = 1 .. 6));

 
> 

NULL

> 

R := [30, 32.5, 37.5, 42.5, 47.5, 50]:

> 

incl := [0, .5, 1, -2, 2*evalf(Pi)-1.75, 0]:

> 

pointplot(R, incl, color = [grey, red, blue, green, black, grey], labels = ["radius", "incl"]);

 
> 

NewR := [seq(30+.4*i, i = 0 .. 50)]:

> 

Newincl := ArrayInterpolation(R, incl, NewR, method = spline):

> 

pointplot(NewR, Newincl, labels = ["radius", "incl"]);

 
> 

phases := [0, (1/12)*evalf(Pi)+.3, 3*evalf(Pi)*(1/4), (1/4)*evalf(Pi)+.2, evalf(Pi)/(2.5)+.5, 0]:

> 

pointplot(R, phases, labels = ["radius", "phase"]);

 
> 

Newphases := ArrayInterpolation(R, phases, NewR, method = spline):

> 

pointplot(NewR, Newphases, labels = ["radius", "phase"]);

 
> 

t := [seq(0+i*(2*Pi*(1/50)), i = 0 .. 50)]:

> 

f := proc (i, j) options operator, arrow; [NewR[i]*cos(t[j]), NewR[i]*sin(t[j]), Newincl[i]*cos(t[j]-Newphases[i])] end proc;

proc (i, j) options operator, arrow; [NewR[i]*cos(t[j]), NewR[i]*sin(t[j]), Newincl[i]*cos(t[j]-Newphases[i])] end proc

(3)
> 

Surface := [seq([seq([NewR[i]*cos(t[j]), NewR[i]*sin(t[j]), Newincl[i]*cos(t[j]-Newphases[i])], i = 1 .. 51)], j = 1 .. 51)]:

> 

plots[surfdata](Surface, labels = ["x [AU]", "y [AU]", "z [AU]"]);

 
> 

``


Download Worksheet_Surfdata-contourplot.mwWorksheet_Surfdata-contourplot.mw

Please Wait...