| Contents | Index |
plot::Cylindrical creates parameterized surfaces in 3D, with parametrization in cylindrical coordinates.
Call:
plot::Cylindrical([r,
, z], u =
..
, v =
..
, <a = amin .. amax>, Options)
Parameters:
|
r, |
the coordinate functions: arithmetical expressions or piecewise objects depending on the surface parameters |
|
u: |
the first surface parameter: an identifier or an indexed identifier. |
|
|
the plot range for the parameter |
|
v: |
the second surface parameter: an identifier or an indexed identifier. |
|
|
the plot range for the parameter |
See Also:
linalg::ogCoordTab, plot, plot::copy, plot::Polar, plot::Spherical, plot::Tube
Details:
plot::Cylindrical creates surfaces parametrized in cylindrical coordinates.
The surface given by a mapping (“parametrization”)
is the set of all image points
![ImageSet(matrix([[r(u, v)], [Symbol::phi(u, v)], [z(u, v)]]), u in [`u_{min}`, `u_{max}`], v in [`v_{min}`, `v_{max}`])](PRIMITIV_Cylindrical_images/math32.png)
in cylindrical coordinates, which translate to the usual “Cartesian” coordinates as

is referred to as “radius,”
as “polar angle,” and
as the “height” of a point.
The functions
,
,
are evaluated on a regular equidistant mesh of sample points in the
-
plane. This mesh is determined by the attributes UMesh, VMesh. By default, the attribute AdaptiveMesh = 0 is set, i.e., no adaptive refinement of the equidistant mesh is used.
If the standard mesh does not suffice to produce a sufficiently detailed plot, one may either increase the value of UMesh, VMesh or USubmesh, VSubmesh,or set AdaptiveMesh = n with some (small) positive integer n. If necessary, up to
additional points are placed in each direction of the
-
plane between adjacent points of the initial equidistant mesh. Cf. example 2.
“Coordinate lines” (“parameter lines”) are curves on the surface.
The phrase “ULines” refers to the curves
with the parameter
running from
to
, while
is some fixed value from the interval
.
The phrase “VLines” refers to the curves
with the parameter
running from
to
, while
is some fixed value from the interval
.
By default, the parameter curves are visible. They may be switched off by specifying ULinesVisible = FALSE and VLinesVisible = FALSE, respectively.
The coordinate lines controlled by ULinesVisible = TRUE/FALSE and VLinesVisible = TRUE/FALSE indicate the equidistant mesh in the
-
plane set via the UMesh, VMesh attributes. If the mesh is refined by the USubmesh, VSubmesh attributes, or by the adaptive mechanism controlled by AdaptiveMesh = n, no additional parameter lines are drawn.
As far as the numerical approximation of the surface is concerned, the settings
,
,
, ![]()
and
,
,
USubmesh = 0, VSubmesh = 0
are equivalent. However, in the first setting, nu parameter lines are visible in the
direction, while in the latter setting
parameter lines are visible. Cf. example 2.
Use Filled = FALSE to obtain a wireframe representation of the surface.
If the expressions/functions
and/or
contain singularities, it is recommended (but not strictly necessary) to use the attribute ViewingBox to set a suitable viewing box. No such precautions are necessary for
, although singularities in this function may result in poorly rendered surfaces – in many cases setting the attributes Mesh and/or AdaptiveMesh to higher values will help. Cf. example 3.
Example 1
Using a constant radius for plot::Cylindrical, with the other two functions straight from the surface parameters, results in a right cylinder. This explains the name “cylindrical coordinates”:
plot(plot::Cylindrical([1, phi, z], phi = 0..2*PI, z = -1..1))

Other straightforward examples include cones and paraboloids of revolution:
plot(plot::Cylindrical([r, phi, 2*r], r = 0..1, phi = 0..2*PI))

plot(plot::Cylindrical([r, phi, r^2], r = 0..1, phi = 0..2*PI))

Example 2
Cylindrical surfaces are drawn from evaluations on an equidistant mesh of points. In some cases, the default mesh density is insufficient or otherwise inappropriate:
plot(plot::Cylindrical([cos(phi^2), phi, z],
phi=-2.8..2.8, z=0..1/2))

One possible change to this plot command is to explicitly set the mesh with the attribute Mesh. Note that this setting influences the density of parameter lines:
plot(plot::Cylindrical([cos(phi^2), phi, z],
phi=-2.8..2.8, z=0..1/2,
Mesh = [100, 5]))

To increase the mesh density without introducing additional parameter lines, you can use submesh settings:
plot(plot::Cylindrical([cos(phi^2), phi, z],
phi=-2.8..2.8, z=0..1/2,
VMesh = 5, USubmesh = 3))

Finally, we can also ask plot::Cylindrical to refine the mesh only in areas of higher curvature. In the following example, we allow for
additional points between each two neighboring points of the initial mesh:
plot(plot::Cylindrical([cos(phi^2), phi, z],
phi=-2.8..2.8, z=0..1/2,
VMesh = 5, AdaptiveMesh = 3))

Example 3
If the radius- or the
-function/expression contains singularities, plot::Cylindrical employs heuristic clipping to select a range to display:
plot(plot::Cylindrical([1/sqrt((phi - PI)^2 + z^2), phi, z],
phi = 0..2*PI, z = -1..1))

While these heuristics work well in many cases, there are also examples where they do not select a useful box:
plot(plot::Cylindrical([1/((phi - PI)^2 + z^2), phi, z],
phi = 0.. 2*PI, z = -1..1))

In these cases, the user should set the range to display explicitly:
plot(plot::Cylindrical([1/((phi - PI)^2+z^2), phi, z],
phi = 0..2*PI, z = -1..1),
ViewingBox = [-2..0.3, -1.5..1.5, -1..1])

Example 4
Since the transformation from cylindrical to orthogonal coordinates is reversible (up to reducing the angle to the range
, it is possible to plot any surface with plot::Cylindrical (although this is probably more a curiosity than really useful):
trans := linalg::ogCoordTab[Cylindrical, InverseTransformation]:
cyl := trans(x, y, sin(x^2+y^2))
![]()
plot(plot::Cylindrical(cyl, x = -2..2, y = -2..2))


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 |