| Contents | Index |
creates a surface of revolution by rotating the function graph
with
around the
-axis.
creates a surface of revolution by rotating the function graph
with
around the
-axis.
Calls:
plot::XRotate(f, x =
..
, <a = amin .. amax>, Options)
plot::ZRotate(f, x =
..
, <a = amin .. amax>, Options)
Parameters:
|
f: |
the function: an arithmetical expression or a piecewise object in the independent variable |
|
x: |
the independent variable: an identifier or an indexed identifier. |
|
|
the plot range: |
See Also:
plot, plot::copy, plot::Function2d, plot::Function3d, plot::Surface
Details:
plot::XRotate rotates the graph of the function
around the
-axis, creating a surface of revolution. The slice of the surface parallel to the
-
plane at a point
is a circle of radius
.
plot::ZRotate rotates the graph of the given function
around the
-axis, creating another surface of revolution. The slice of the surface parallel to the
-
plane at a point
consists of circles with radii
given by the solutions of
.
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
, 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.
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
and
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
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)



Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |