Application Center - Maplesoft

App Preview:

Contour plot in 3-D space

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application



Contour Plot in 3-Dimensions

? 1998 Waterloo Maple Inc.

NOTE: This worksheet demonstrates how to convert a 2D contour plot into a 3-Dimensional surface (and contour projection)  using  MapleV.


This example uses Maple V's 'plottools' package to transform a 2D contour plot into 3-dimensional space.

> restart:

'dropshadowplot' program

> dropshadowplot := proc(F::algebraic, r1::name=range,r2::name=range,r3::name=range)
       local minz, p2, p3, coption, opts, f,g,x,y;

       opts := [args[5..nargs]];

       if not hasoption(opts,'contours',coption,'opts')

          then coption :=8;


       if type(r3,range) then

         minz := lhs(r3);


         minz := lhs(rhs(r3));


       minz := evalf(minz);

       p3 := plots[contourplot3d](F,r1,r2,'contours'=coption,op(opts));

       p2 := plots[contourplot](F,r1,r2,'contours'=coption,op(opts));

       g := unapply([x,y,minz],x,y);

       f := plottools[transform](g);




> expr := -5*x/(x^2+y^2+1);

expr := -5*x/(x^2+y^2+1)

> dropshadowplot(expr, x=-3..3, y=-3..3, z=-4..3, filled=true,
  contours=6, axes=frame);