Function Repository Resource:

# SectionParametricPlot3D

Plot a surface defined parametrically together with various types of sections of the surface

Contributed by: Dennis M Schneider
 ResourceFunction["SectionParametricPlot3D"][{fx,fy,fz},{u,umin,umax},{v,vmin,vmax},opts] plots a 3D surface parametrized by u and v with sections specified by the options "XSection","YSection","ZSection","VSection" and "OSection". ResourceFunction["SectionParametricPlot3D"][f,u,v,{{gx,gy},…},{t,tmin,tmax}] plots a 3D surface together with the generalized cylinders described parametrically by {{gx,gy},…} over {t,tmin,tmax}. ResourceFunction["SectionParametricPlot3D"][f,u,v,{{gx,gy,gz},…},t] plots the cylinders to the z-value of gz.

## Details and Options

Generalized cylinders need not be circular.
Generalized cylinders are defined as in MathWorld.
Generalized cylinders described by two parametric equations are drawn from the base of the bounding box to the top of the box.
Generalized cylinders described by three parametric equations are drawn from the base of the bounding box to the height gz(t).
ResourceFunction["SectionParametricPlot3D"] has the same options as ParametricPlot3D, with the following additions and changes:
 "ColorFunctionSection" Automatic specifies the color function(s) for the section "ColorFunctionSurface" Automatic specifies the color function(s) for the surface "CylinderBase" Automatic determines the z-value to which cylinders are projected "CylinderRange" Automatic determines the range of the cylinder "CylinderStyle" Opacity[0.5] specifies style for the cylinder; it ignores color specifications "DrawCylinder" True whether to draw the cylinder determining parametrically defined sections "DrawPoint" {} a list of points to be included in the plot "DrawPointStyle" {{Red,PointSize[Large]}} styles to be applied to the points specified with the option "DrawPoint" "OSection" {} draws an oblique section determined by functions of the form z=f[x],z=g[y] or z=h[x,y] "OSectionStyle" {{Red,Tube[.02]}} styles to be applied to the oblique sections "PlotPointsSection" 75 specifies how many initial sample points to use in plotting sections PlotStyle Opacity[0.7] graphics directive for the style for each surface "SectionStyle" {{Red,Tube[.02]}} styles to be applied to sections defined parametrically by {gx,gy} "SectionVariables" {} specify independent variables used to define v-sections or o-sections "Surface" True whether to return the surface in the plot "VSection" {} draws vertical section(s) for a function or list of functions of the form y=f[x] or x=g[y] "VSectionStyle" {{Red,Tube[.02]}} styles to be applied to the vertical sections "XSection" {} draws vertical sections parallel to the yz-plane determined by the value or list of values of x "XSectionStyle" {{Red,Tube[.02]}} styles to be applied to the x-sections "YSection" {} draws vertical sections parallel to the xz-plane determined by the value or list of values of y "YSectionStyle" {{Red,Tube[.02]}} styles to be applied to the y-sections "ZSection" {} draws horizontal sections parallel to the xy-plane determined by the value or list of values of z "ZSectionStyle" {{Red,Tube[.02]}} styles to be applied to the z-sections
When "DrawPoint" contains points with two coordinates, those points represent (u,v)-coordinates and the point is found by substituting these values into the parametric equations defining the surface. When "DrawPoint" contains points with three coordinates, then the point is given in (x,y,z)-coordinates.

## Examples

### Basic Examples (1)

Plot a paraboloid with an elliptical section:

 In[1]:=
 Out[1]=

### Scope (3)

Plot a surface with all possible plane sections:

 In[2]:=
 Out[2]=

Plot a surface with both a plane section and a parametrically defined section:

 In[3]:=
 Out[3]=

Plot two surfaces with their intersection illustrated with two sections:

 In[4]:=
 Out[4]=

Define the x-sections by parametrically defined curves:

 In[5]:=
 Out[5]=

Illustrate the x-sections without including the cylinder used to define them:

 In[6]:=
 Out[6]=

### Options (30)

#### ColorFunctionSection (2)

Set a color function for the sections:

 In[7]:=
 Out[7]=

Set a different style for each section:

 In[8]:=
 Out[8]=

#### ColorFunctionSurface (2)

Set a style for the surface:

 In[9]:=
 Out[9]=

Set a color function for both the surface and the sections:

 In[10]:=
 Out[10]=

#### CylinderBase (1)

Set where to place the base of the cylinder:

 In[11]:=
 Out[11]=

#### CylinderRange (5)

Set the cylinder to be drawn from the top of the bounding box down to the surface:

 In[12]:=
 Out[12]=

Draw the cylinder both above and below the surface:

 In[13]:=
 Out[13]=

Draw the cylinder to full height:

 In[14]:=
 Out[14]=

Draw a cylinder from a base of −2 to the surface (this is the same as setting CylinderBase−2):

 In[15]:=
 Out[15]=

CylinderRange takes precedence over CylinderBase:

 In[16]:=
 Out[16]=
 In[17]:=
 Out[17]=

#### CylinderStyle (1)

Apply a style to the cylinder:

 In[18]:=
 Out[18]=

#### DrawCylinder (1)

Suppress the plot of the cylinder:

 In[19]:=
 Out[19]=

#### DrawPoint and DrawPointStyle (2)

When "DrawPoint" contains one or more 2-tuples, then the point determined by these 2-tuples is found by substituting these parameter values into the definition of the function:

 In[20]:=
 Out[20]=

Points given by 3-tuples have their usual meaning as (x,y,z)-coordinates:

 In[21]:=
 Out[21]=

#### OSection (2)

Cutting the cone with a plane not passing through the vertex of the cone and not parallel to an axis of the cone will give an ellipse. Note that the variables used to specify the plane must be given in a list:

 In[22]:=
 Out[22]=

When the plane is parallel to the side of the cone, a parabola is generated:

 In[23]:=
 Out[23]=

#### OSectionStyle (1)

 In[24]:=
 Out[24]=

#### PlotPointsSection (1)

Change the number of points used to plot the section(s). Since the Wolfram Language’s plotting commands use adaptive procedures to determine how many points to actually plot, this feature must be turned off by setting the option MaxRecursion:

 In[25]:=
 Out[25]=

#### PlotStyle (1)

Apply a style to the surface:

 In[26]:=
 Out[26]=

#### SectionStyle (1)

Apply styles to the section:

 In[27]:=
 Out[27]=

#### Surface (1)

Suppress the plot of the surface:

 In[28]:=
 Out[28]=

#### VSection (2)

Add vertical sections (remember that sections’ variables must be specified):

 In[29]:=
 Out[29]=

VSections can be any function of x or y:

 In[30]:=
 Out[30]=

#### VSectionStyle (1)

Set style for the sections:

 In[31]:=
 Out[31]=

#### XSection (1)

The intersection of planes of the form x=a with a cone generate either hyperbolas or lines:

 In[32]:=
 Out[32]=

#### XSectionStyle (1)

Assign a style to the XSection:

 In[33]:=
 Out[33]=

#### YSection (1)

 In[34]:=
 Out[34]=

#### YSectionStyle (1)

Set a style for the YSection:

 In[35]:=
 Out[35]=

#### ZSection (1)

 In[36]:=
 Out[36]=

#### ZSectionStyle (1)

Set a style for the ZSections:

 In[37]:=
 Out[37]=

## Publisher

Dennis M Schneider

## Version History

• 1.0.0 – 05 November 2019