ParametricPlot3D

ParametricPlot3D[{fx,fy,fz},{u,umin,umax}]

produces a three-dimensional space curve parametrized by a variable u which runs from umin to umax.

ParametricPlot3D[{fx,fy,fz},{u,umin,umax},{v,vmin,vmax}]

produces a three-dimensional surface parametrized by u and v.

ParametricPlot3D[{{fx,fy,fz},{gx,gy,gz},},]

plots several objects together.

ParametricPlot3D[,{u,v}reg]

takes parameters {u,v} to be in the geometric region reg.

Details and Options

  • ParametricPlot3D is known as a parametric curve when plotting over a 1D domain, and as a parametric surface when plotting over a 2D domain. If the surface is created from sweeping a straight line along a path, it is called a ruled surface.
  • For a 1D domain, ParametricPlot3D evaluates fx, fy and fz at different values of u to create a smooth curve of the form {fx[u],fy[u],fz[u]}. It visualizes the set .
  • With a 2D domain, it creates a surface from the points {fx[u,v],fy[u,v],fz[u,v]}. It visualizes the set .
  • The curves and surfaces may intersect or overlap themselves.
  • Gaps are left at any point where the fi evaluate to anything other than real numbers.
  • The limits umin, umax, vmin and vmax can be real numbers or Quantity expressions.
  • The region reg can be any RegionQ object in 1D or 2D.
  • ParametricPlot3D treats the variables u and v as local, effectively using Block.
  • ParametricPlot3D has attribute HoldAll, and evaluates the f_(i), g_(i), only after assigning specific numerical values to variables.
  • In some cases it may be more efficient to use Evaluate to evaluate the f_(i), g_(i), symbolically before specific numerical values are assigned to variables.
  • The following wrappers w can be used for {fx,fy,fz}:
  • Annotation[{fx,fy,fz},label]provide an annotation for {fx,fy,fz}
    Button[{fx,fy,fz},action]evaluate action when the surface for {fx,fy,fz} is clicked
    Callout[{fx,fy,fz},label]label the function with a callout
    Callout[{fx,fy,fz},label,pos]place the callout at relative position pos
    EventHandler[{fx,fy,fz},events]define a general event handler for {fx,fy,fz}
    Hyperlink[{fx,fy,fz},uri]make the function a hyperlink
    Labeled[{fx,fy,fz},label]label the function
    Labeled[{fx,fy,fz},label,pos]place the label at relative position pos
    Legended[{fx,fy,fz},label]identify the function in a legend
    PopupWindow[{fx,fy,fz},cont]attach a popup window to the function
    StatusArea[{fx,fy,fz},label]display in the status area on mouseover
    Style[{fx,fy,fz},styles]show the function using the specified styles
    Tooltip[{fx,fy,fz},label]attach a tooltip to the function
    Tooltip[{fx,fy,fz}]use functions as tooltips
  • Wrappers w can be applied at multiple levels:
  • w[{fx,fy,fz}]wrap {fx,fy,fz}
    w[{{fx,fy,fz},{gx,gy,gz},}]wrap a collection of curves
    w1[w2[]]use nested wrappers
  • Callout, Labeled and Placed can use the following positions pos:
  • Automaticautomatically placed labels
    Above, Below, Before, Afterpositions around the surface
    unear the surface at parameter u
    {x,y,z}position near {x,y,z}
    Scaled[s]scaled position s along the surface
    {s,Above},{s,Below},relative position at position s along the curve
    {pos,epos}epos in label placed at relative position pos of the curve
  • ParametricPlot3D has the same options as Graphics3D, with the following additions and changes:
  • AxesTruewhether to draw axes
    BoundaryStyleNonehow to draw boundary lines for surfaces
    ColorFunctionAutomatichow to determine the color of curves and surfaces
    ColorFunctionScalingTruewhether to scale arguments to ColorFunction
    EvaluationMonitorNoneexpression to evaluate at every function evaluation
    ExclusionsAutomaticu points or u,v curves to exclude
    ExclusionsStyleNonewhat to draw at excluded points or curves
    LabelingSizeAutomaticmaximum size of callouts and labels
    MaxRecursionAutomaticthe maximum number of recursive subdivisions allowed
    MeshAutomatichow many mesh divisions in each direction to draw
    MeshFunctionsAutomatichow to determine the placement of mesh divisions
    MeshShadingNonehow to shade regions between mesh divisions
    MeshStyleAutomaticthe style for mesh divisions
    MethodAutomaticthe method to use for refining surfaces
    NormalsFunctionAutomatichow to determine effective surface normals
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotLabelsNonelabels to use for curves
    PlotLegendsNonelegends for surfaces
    PlotPointsAutomaticthe initial number of sample points in each parameter
    PlotRangeAutomaticrange of values to include
    PlotStyleAutomaticgraphics directives for the style for each object
    PlotTheme$PlotThemeoverall theme for the plot
    RegionFunction(True&)how to determine whether a point should be included
    ScalingFunctionsNonehow to scale individual coordinates
    TextureCoordinateFunctionAutomatichow to determine texture coordinates
    TextureCoordinateScalingTruewhether to scale arguments to TextureCoordinateFunction
    WorkingPrecisionMachinePrecisionthe precision used in internal computations
  • Typical settings for PlotLegends include:
  • Noneno legend
    Automaticautomatically determine the legend
    "Expressions"use f1, f2, as the legend labels
    {lbl1,lbl2,}use lbl1, lbl2, as the legend labels
    Placed[lspec,]specify placement for the legend
  • All the functions f_(x) etc. should give real numbers for all values of parameters at which they are evaluated. There will be holes in the final surface anywhere at which f_(x) etc. do not yield real number values.
  • The default setting PlotPoints->Automatic corresponds to PlotPoints->75 for curves and PlotPoints->{15,15} for surfaces.
  • ParametricPlot3D initially evaluates each function at a number of equally spaced sample points specified by PlotPoints. Then it uses an adaptive algorithm to choose additional sample points, subdividing in each parameter at most MaxRecursion times.
  • You should realize that with the finite number of sample points used, it is possible for ParametricPlot3D to miss features in your functions. To check your results, you should try increasing the settings for PlotPoints and MaxRecursion.
  • On[ParametricPlot3D::accbend] makes ParametricPlot3D print a message if it is unable to reach a certain smoothness of curve.
  • The default setting Mesh->Automatic corresponds to None for curves, and 15 for surfaces.
  • The default setting MeshFunctions->Automatic corresponds to {#4&} for curves, and {#4&,#5&} for surfaces.
  • The arguments supplied to functions in MeshFunctions and RegionFunction are x, y, z, u, and v. Functions in ColorFunction and TextureCoordinateFunction are by default supplied with scaled versions of these arguments.
  • The functions are evaluated all along each curve, or all over each surface.
  • Possible settings for ScalingFunctions include:
  • {sx,sy,sz}scale x, y and z axes
    {sx,sy,sz,su}scale the u parameter space
    {sx,sy,sz,su,sv}scale the u and v parameter spaces
  • Possible settings for ScalingFunctions include:
  • {sx,sy,sz}scale x, y and z axes
  • Common built-in scaling functions s include:
  • "Log"log scale with automatic tick labeling
    "Log10"base-10 log scale with powers of 10 for ticks
    "SignedLog"log-like scale that includes 0 and negative numbers
    "Reverse"reverse the coordinate direction
  • Scaling the u or v parameter spaces affects how the plot is sampled, but not the overall visual appearance of the plot.
  • ParametricPlot3D returns Graphics3D[GraphicsComplex[data]].
  • Themes that affect 3D surfaces include:
  • "DarkMesh"dark mesh lines
    "GrayMesh"gray mesh lines
    "LightMesh"light mesh lines
    "ZMesh"vertically distributed mesh lines
    "ThickSurface"add thickness to surfaces

Examples

open allclose all

Basic Examples  (5)

Plot a parametric surface:

Plot a parametric space curve:

Plot multiple parametric surfaces:

Use simple styling of surfaces:

Plot surfaces with cuts:

Scope  (33)

Sampling  (9)

More points are sampled when the function changes quickly:

The plot range is selected automatically:

Ranges where the function becomes nonreal are excluded:

The surface is split when there are discontinuities in the function:

Use PlotPoints and MaxRecursion to control adaptive sampling:

Use PlotRange to focus in on areas of interest:

Use Exclusions to split the resulting surface:

The domain of the parameters may be specified by a region:

With two parameters:

The domain of the parameters may be specified by a MeshRegion:

Labeling and Legending  (10)

Use Callout to add the expressions as a label:

Use PlotLabels to label the surface:

Use any text as a label:

Label a surface:

Place the label along the curve:

Place the label at a scaled position:

Place the labels relative to the surface:

Label the curve with PlotLabels:

Specify the label at the {x,y,z} position:

Include legends for each curve:

Include legends for each surface:

Use Legended to provide a legend for a specific curve:

Use Placed to change the legend location:

Presentation  (14)

Multiple curves are automatically colored to be distinct:

Provide explicit styling to different curves and regions:

Add legends to identify curves and regions:

Use a theme with detailed ticks, grid lines, and legends:

Increase the thickness of the surface:

Use Opacity to show internal structure and Specularity for additional depth cuing:

Add labels:

Provide an interactive Tooltip for each curve or region:

Create an overlay mesh:

Style the areas between mesh levels:

Color by parameter values:

Use named color schemes:

Remove portions of a curve or surface:

Use ScalingFunctions to scale reverse the z axis:

Scale the parameters rather than the axes:

Options  (87)

BoundaryStyle  (4)

No boundary is drawn by default:

Use a thick red boundary:

Boundaries are drawn where the surface is clipped by RegionFunction:

Boundaries are not drawn where the surface is clipped by Exclusions:

Boxed  (1)

Do not draw the edges of the bounding box:

BoxRatios  (2)

Choose the ratios of side lengths from the actual plot values:

Set the ratios to {1,1,1}:

ColorFunction  (5)

Color the curve by scaled , , , or value:

Color the surface by scaled , , , , or value:

Use a named color gradient:

ColorFunction has higher priority than PlotStyle:

Use red for the parameter :

ColorFunctionScaling  (1)

Color by absolute value:

EvaluationMonitor  (3)

Show where in parameter space ParametricPlot3D samples:

Show where ParametricPlot3D samples in space:

Count how many points are sampled:

Exclusions  (6)

This uses automatic methods to compute exclusions, in this case from branch cuts:

Indicate that no exclusions should be computed:

Give a set of exclusions as an equation:

Give two sets of exclusions:

Use both automatically computed and explicit exclusions:

Provide an explicit list of points for exclusions:

ExclusionsStyle  (3)

Style the boundary with a thick blue line:

Style the boundary with a thick blue line and the surface in between with yellow:

Style the exclusions for a curve with a red line:

LabelingSize  (2)

Textual labels are shown at their actual sizes:

Specify the size of the text:

Image labels are resized to fit in the plot:

Specify the labeling size:

MaxRecursion  (2)

Refine the surface where it changes quickly:

Refine the curve where it changes quickly:

Mesh  (5)

Show the initial and final sampling mesh:

Use 10 mesh levels evenly spaced in the parameter directions:

Use a different number of mesh lines in different directions:

Use an explicit list of values for the mesh in the parameter and no mesh in the parameter:

Use explicit value and style for the mesh:

MeshFunctions  (3)

Use a mesh evenly spaced in the , , , and directions:

Use a mesh evenly spaced in the , , , , and directions:

Show five mesh levels in the direction (red) and 10 in the direction (blue):

MeshShading  (9)

Map a cellular automaton array onto a sphere:

Alternate red and blue arcs in the direction:

Use None to remove segments:

MeshShading can be used with PlotStyle:

MeshShading has higher priority than PlotStyle for styling:

Use the PlotStyle for some segments by setting MeshShading to Automatic:

MeshShading can be used with ColorFunction:

Fill between regions defined by multiple mesh functions:

Use FaceForm to use different styles for different sides of a surface:

MeshStyle  (3)

Automatically choose the mesh style:

Use a red mesh in the direction:

Use a red mesh in the direction and a blue mesh in the direction:

NormalsFunction  (3)

Normals are automatically calculated:

Use None to get flat shading for all the polygons:

Vary the effective normals used on the surface:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLabels  (6)

Specify text to label a curve:

Use Placed to place the label above the curve:

Use Callout to draw a leader line:

Place the labels differently for each curve:

PlotLabels->"Expressions" uses functions as curve labels:

Use callouts to identify the surfaces:

Specify the callout label at a position for a surface:

PlotLegends  (3)

Use placeholders to identify plot styles:

Use specific labels:

Use the respective expressions:

Use Placed to control legend position:

Use SwatchLegend to change the appearance:

PlotPoints  (1)

Use more initial points to get a smoother plot:

PlotStyle  (4)

Use different style directives:

By default different styles are chosen for multiple curves:

Explicitly specify the style for different curves and regions:

Use a different style inside the surface:

PlotTheme  (3)

Use a theme with simple ticks in a bright color scheme:

Remove mesh lines and boundary lines:

Create a thick surface for 3D printing:

RegionFunction  (3)

Select a region in , , , , and :

Select a region in parameter space:

Select portions of a curve in parameter space:

ScalingFunctions  (6)

By default, plots have linear scales in all directions:

Apply a log scale to the z direction:

Use a shifted log scale to show a function with negative positions:

Use ScalingFunctions to reverse the coordinate direction in :

Use a scale defined by a function and its inverse:

Scale any of the parameter spaces rather than the axes:

Scale the u parameter:

Scale the v parameter:

TextureCoordinateFunction  (4)

Textures use scaled and parameters by default:

Use the and coordinates:

Use unscaled coordinates:

Use textures to highlight how parameters map onto a surface:

TextureCoordinateScaling  (1)

Use scaled or unscaled coordinates for textures:

WorkingPrecision  (2)

Evaluate functions using machine-precision arithmetic:

Evaluate functions using arbitrary-precision arithmetic:

Applications  (7)

Simple parametric surfaces, including a plane:

Cylinder:

Cone:

Sphere:

Ellipsoid:

Torus:

Well-known surfaces, including the Möbius strip:

Klein bottle:

Implement a model of mollusc shell growth [more info]:

Highlighting a space curve by providing a supporting (ruled) surface:

Show both plots together:

The Lorenz equations [more info]:

Compute a parametric curve from curvature and torsion [more info]:

Plot the resulting space curves:

Show Enneper's minimal surface:

Properties & Relations  (6)

Plot3D is a special case of ParametricPlot3D for surfaces:

Use RevolutionPlot3D and SphericalPlot3D for cylindrical and spherical coordinates:

Use ParametricPlot for curves and regions in two dimensions:

Use ContourPlot3D and RegionPlot3D for implicitly defined surfaces and regions:

Use ListPlot3D and ListSurfacePlot3D for data:

Use ListLinePlot3D to plot curves through lists of points:

Possible Issues  (3)

Surfaces that have multiple coverings may exhibit unusual behavior:

Use BoundaryStyle and MeshStyle together for closed surfaces:

Automatic PlotRange depends on parametrization:

Use a different parametrization:

Or use PlotRange->All:

Neat Examples  (1)

Variations on a sphere:

Wolfram Research (1991), ParametricPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ParametricPlot3D.html (updated 2022).

Text

Wolfram Research (1991), ParametricPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ParametricPlot3D.html (updated 2022).

CMS

Wolfram Language. 1991. "ParametricPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ParametricPlot3D.html.

APA

Wolfram Language. (1991). ParametricPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParametricPlot3D.html

BibTeX

@misc{reference.wolfram_2022_parametricplot3d, author="Wolfram Research", title="{ParametricPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ParametricPlot3D.html}", note=[Accessed: 05-October-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_parametricplot3d, organization={Wolfram Research}, title={ParametricPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/ParametricPlot3D.html}, note=[Accessed: 05-October-2022 ]}