CrossSection - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim





show the intersection between a plane and a surface


Calling Sequence




Calling Sequence

CrossSection(f(x,y), g(x,y,z)=K, x=a..b, y=c..d, opts)

CrossSection(f(x,y,z), g(x,y,z)=K, x=a..b, y=c..d, z=e..f, opts)


f(x, y)


algebraic expression

f(x, y, z)


algebraic equation or expression

g(x, y, z)


linear algebraic expression



constant, list, or range of constants

x, y, z


name; specify the independent variables

a, b, c, d, e, f


real constants; range of the function



(optional) equation(s) of the form option=value where option is one of functionoptions, intersectionoptions, output, planeoptions, planes or showfunction; specify output options



The CrossSection command returns a plot or animation of the intersection between the surface f and the plane g. The intersection of multiple parallel planes can be shown by making the variable K a range or a list of real numbers.  If a range is used, a sequence of planes is generated within the range. The number of planes is determined by the optional argument planes. If a list is used, the planes are displayed in the order specified.


Curves of the form fx,y are assumed to be z=fx,y.


To return level curves, specify a variable name for g(x,y,z), for example, z.


Planes that are not intersecting or tangent to the surface f are not displayed.


The CrossSectionTutor routine offers equivalent capabilities to CrossSection in a tutor interface. See the Student[MultivariateCalculus][CrossSectionTutor] help page.


The opts argument can contain any of the following equations that set output options.




functionoptions = list


Specifies the plot options for plotting the surface f. For more information on plotting options, see plot3d/options.




intersectionoptions = list


Specifies the plot options for plotting the curves formed by the intersections of the planes and the surface. For more information on plotting options, see plot3d/options.




output = plot or animation


This option controls the return value of the function.


* output = plot specifies that a plot displays, which shows the expression and all the planes.  The default is output = plot.


* output = animation specifies that an animation displays, which shows the expression and the chosen planes in succession.




planeoptions = list


Specifies the plot options for plotting the plane(s) g. For more information on plotting options, see plot3d/options.




planes = posint


Specifies the number of planes if the variable K is a range. The default is 10.




showfunction = true or false


Determines whether the function f is plotted. The default is true.




caption = anything


A caption for the plot.


The default caption is constructed from the parameters and the command options. caption = "" disables the default caption. For more information about specifying a caption, see plot/typesetting.


For more information, see plot3d/options.


For information on how to change the default colors, see the Student[SetColors] help page.




Return z=constant level curves.


The command to create the plot from the Plotting Guide is


See Also