SliceSurface Package

Mathematica Packages
Bruce Torrence Homepage

SliceSurface[x^2 + y^2 == z^2,{x,-1,1},{y,-1,1},{z,-1,1}]

- Graphics -

Synopsis

This package provides a single command, SliceSurface, which will make a sketch of any surface given by an equation f(x, y, z) = g(x, y, z).

Command

The following command is provided in this package:

SliceSurface[f==g,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}] produces a 3D plot of the surface described by the equation in 3 variables f==g. For instance, the equation might be x^2+y^2-z^2==4. The plot consists of level-curves in the x, y, and z directions; i.e. it consists of contours produced by the intersection of the surface with planes z=z1, z=z2, ... , y=y1, y=y2, ... , x=x1, x=x2, ... SliceSurface may also be used as a utility for graphing a real-valued function g[x,y] of two variables - in this case the syntax may be simplified to match that of Plot3D. That is, one may use SliceSurface[g,{x,xmin,xmax},{y,ymin,ymax}]. There are several important options in either case. The option XContours controls the number of contours in the x-direction. It may be set to a number or a list {x1,x2,...}. YContours and ZContours behave similarly. The option XContourStyle controls the color, thickness, etc. of the x-contours. It may be set to a Graphics3D directive or a list of such directives. YContourStyle and ZContourStyle behave similarly. SliceSurface can also take any options handled by ImplicitPlot (in the Graphics`ImplicitPlot` package). For instance, the option PlotPoints->40 might be applied to smooth out jaggies in the contours. Finally, SliceSurface will also intelligently handle any Graphics3D options you may wish to apply to the final plot.


Last Updated: June 20, 2002