plot::ZRotate

Surfaces of revolution around z-axis

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

plot::ZRotate(f, x = xmin .. xmax, <a = amin .. amax>, options)

Description

plot::ZRotate(f, x = `x_{min}`..xmax) creates a surface of revolution by rotating the function graph z = f(x) with x ∈ [xmin, xmax] around the z-axis.

plot::ZRotate rotates the graph of the given function z = f(x) around the z-axis, creating another surface of revolution. The slice of the surface parallel to the x-y plane at a point z consists of circles with radii |xi| given by the solutions of f(x) = z.

The range of the rotation can be restricted with the attributes AngleBegin, AngleEnd, AngleRange. The surface of revolution will only span over the given range of the rotation angle.

Surfaces of revolution are parametrized surfaces. The first surface parameter is x, the second is the rotation angle. Surfaces of revolution react to most of the graphical attributes that surfaces of type plot::Surface react to. For example, use Mesh, Submesh to control the numerical mesh or use ULinesVisible, VLinesVisible to switch the parameter lines on/off.

Attributes

AttributePurposeDefault Value
AdaptiveMeshadaptive sampling0
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
AngleEndend of angle range2*PI
AngleBeginbegin of angle range0
AngleRangeangle range0 .. 2*PI
Colorthe main colorRGB::Red
Filledfilled or transparent areas and surfacesTRUE
FillColorcolor of areas and surfacesRGB::Red
FillColor2second color of areas and surfaces for color blendsRGB::CornflowerBlue
FillColorTypesurface filling typesDichromatic
FillColorFunctionfunctional area/surface coloring 
FillColorDirectionthe direction of color transitions on surfaces[0, 0, 1]
FillColorDirectionXx-component of the direction of color transitions on surfaces0
FillColorDirectionYy-component of the direction of color transitions on surfaces0
FillColorDirectionZz-component of the direction of color transitions on surfaces1
Framesthe number of frames in an animation50
Functionfunction expression or procedure 
Legendmakes a legend entry 
LegendTextshort explanatory text for legend 
LegendEntryadd this object to the legend?TRUE
LineColorcolor of linesRGB::Black.[0.25]
LineWidthwidth of lines0.35
LineColor2color of linesRGB::DeepPink
LineStylesolid, dashed or dotted lines?Solid
LineColorTypeline coloring typesFlat
LineColorFunctionfunctional line coloring 
LineColorDirectionthe direction of color transitions on lines[0, 0, 1]
LineColorDirectionXx-component of the direction of color transitions on lines0
LineColorDirectionYy-component of the direction of color transitions on lines0
LineColorDirectionZz-component of the direction of color transitions on lines1
Meshnumber of sample points[25, 25]
MeshVisiblevisibility of irregular mesh lines in 3DFALSE
Namethe name of a plot object (for browser and legend) 
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
PointSizethe size of points1.5
PointStylethe presentation style of pointsFilledCircles
PointsVisiblevisibility of mesh pointsFALSE
Shadingsmooth color blend of surfacesSmooth
Submeshdensity of submesh (additional sample points)[0, 0]
TimeEndend time of the animation10.0
TimeBeginstart time of the animation0.0
TimeRangethe real time span of an animation0.0 .. 10.0
Titleobject title 
TitleFontfont of object titles[" sans-serif ", 11]
TitlePositionposition of object titles 
TitleAlignmenthorizontal alignment of titles w.r.t. their coordinatesCenter
TitlePositionXposition of object titles, x component 
TitlePositionYposition of object titles, y component 
TitlePositionZposition of object titles, z component 
ULinesVisiblevisibility of parameter lines (u lines)TRUE
UMeshnumber of sample points for parameter "u"25
USubmeshdensity of additional sample points for parameter "u"0
VLinesVisiblevisibility of parameter lines (v lines)TRUE
VMeshnumber of sample points for parameter "v"25
VSubmeshdensity of additional sample points for parameter "v"0
VisiblevisibilityTRUE
VisibleAfterobject visible after this time value 
VisibleBeforeobject visible until this time value 
VisibleFromToobject visible during this time range 
VisibleAfterEndobject visible after its animation time ended?TRUE
VisibleBeforeBeginobject visible before its animation time starts?TRUE
XContourscontour lines at constant x values[]
XMaxfinal value of parameter "x"5
XMininitial value of parameter "x"0
XNamename of parameter "x" 
XRangerange of parameter "x"0 .. 5
YContourscontour lines at constant y values[]
ZContourscontour lines at constant z values[]

Examples

Example 1

By default, plot::XRotate displays a complete revolution, just as if an object was created on a lathe:

plot(plot::XRotate(2 - sin(x), x = 0..2*PI))

This rotation is insensitive to negative values: The surfaces of revolution of f(x) and |f(x)| are identical:

plot(plot::Scene3d(plot::XRotate(sin(x), x = 0..2*PI)),
     plot::Scene3d(plot::XRotate(abs(sin(x)), x = 0..2*PI)),
     Layout = Horizontal)

This symmetry is broken when not performing a whole revolution:

plot(plot::Scene3d(plot::XRotate(sin(x), x = 0..2*PI,
                                 AngleRange = -PI/2..PI/2)),
     plot::Scene3d(plot::XRotate(abs(sin(x)), x = 0..2*PI,
                                 AngleRange = -PI/2..PI/2)),
     Layout = Horizontal)

plot::XRotate can be animated, like almost every plot object:

plot(plot::XRotate(sin(x + a), x = 0 .. 2*a + PI,
                   AngleRange = 0 .. PI + a/2, 
                   a = 0..2*PI))

Example 2

As for plot::ZRotate, most of the points from above hold here, too. Obviously, the symmetry for a whole revolution is now with respect to the x values, not the function values:

plot(plot::Scene3d(plot::ZRotate(exp(x), x = -1..1)),
     plot::Scene3d(plot::ZRotate(exp(-x), x = -1..1)),
     Layout = Horizontal)

plot(plot::Scene3d(plot::ZRotate(exp(x), x = -1..1,
                                 AngleRange = -a..a, 
                                 a = 0..PI)),
     plot::Scene3d(plot::ZRotate(exp(-x), x = -1..1,
                                 AngleRange = -a..a, 
                                 a = 0..PI)),
     Layout = Horizontal)

Parameters

f

The function: an arithmetical expression or a piecewise object in the independent variable x and the animation parameter a. Alternatively, a procedure that accepts 1 input parameter x or 2 input parameters x, a and returns a real numerical value when the input parameters are numerical.

f is equivalent to the attribute Function.

x

The independent variable: an identifier or an indexed identifier.

x is equivalent to the attribute XName.

xmin .. xmax

The plot range: xmin, xmax must be numerical real values or expressions of the animation parameter a.

xmin .. xmax is equivalent to the attributes XRange, XMin, XMax.

a

Animation parameter, specified as a = amin..amax, where amin is the initial parameter value, and amax is the final parameter value.

See Also

MuPAD Functions

MuPAD Graphical Primitives

Was this topic helpful?