Surface with Level Curves (Contours) Projected onto
the xy
-Plane
Dr. K. G. TeBeest
> with( plots ) : with( plottools ) :
Warning, the name changecoords has been redefinedExample 1: Elliptic Paraboloid
> f := x^2 + 3*y^2 ;
> p := plot3d( f, x = 5.0 .. 5.0, y = 3.0 .. 3.0, style = patchcontour, contours = 8, scaling = unconstrained, axes = framed ) :
> q := contourplot( f , x = 5.0 .. 5.0, y = 3.0 .. 3.0, filled = true ) :
> F := transform( (x,y) > [ x, y, 0] ) : # This plots the contour plot (the level curves of f ) and displays it in the plane z = 0.
> display( { p, F(q) } ) ;
Example 2: Hyperbolic Paraboloid
> f := x^2 y^2 ;
> p := plot3d( f, x = 3.0 .. 3.0, y = 3.0 .. 3.0, style = patchcontour, contours = 8, scaling = unconstrained, axes = framed ) :
> q := contourplot( f, x = 3.0 .. 3.0, y = 3.0 .. 3.0, contours = 8, filled = true ) :
> F := transform( (x,y) > [ x, y, 20 ] ) : # This plots the contour plot (the level curves of f ) but displays (shifts) it down to the plane z = 20.
> display( { p, F(q) } ) ;
Dr. K. G. TeBeest
Applied Mathematics
Kettering University