Skip to Main Content Skip to Search
Product Documentation

plot::Cylindercylinders

plot::Cylinder(r, [x_1, y_1, z_1], [x_2, y_2, z_2]) creates a cylinder of radius r with an axis from the point [x_1, y_1, z_1] to the point [x_2, y_2, z_2].

→ Examples

Call:

plot::Cylinder(r, [x1, y1, z1], [x2, y2, z2], <a = amin .. amax>, Options)

Parameters:

r

the radius of the cylinder: a real numerical value or an arithmetical expression of the animation parameter a
r is equivalent to the attribute Radius.

x1, y1, z1

components of the base center: real numerical values or expressions of the animation parameter a
x1, y1, z1 are equivalent to the attributes BaseX, BaseY, BaseZ.

x2, y2, z2

components of the top center: real numerical values or expressions of the animation parameter a
x2, y2, z2 are equivalent to the attributes TopX, TopY, TopZ.

Related Domains:

plot::Cone, plot::Prism, plot::Pyramid

Related Functions:

plot, plot::copy

Details:

Example 1

We plot three cylinders with symmetry axes given by the coordinate axes:

plot(plot::Cylinder(1, [-3, 0, 0], [3, 0, 0],
                    Color = RGB::Red),
     plot::Cylinder(1, [0, -4, 0], [0, 4, 0],
                    Color = RGB::Green),
     plot::Cylinder(1, [0, 0, -5], [0, 0, 5],
                    Color = RGB::Blue)):

MuPAD graphics

Example 2

All parameters of a cylinder can be animated:

plot(plot::Cylinder(a, [0, 0, a], [0, 0, 3 - a],
                    a = 1 .. 2))

MuPAD graphicsimage

  


Recommended Products

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