Skip to Main Content Skip to Search
Product Documentation

plot::Conecones and frustums

plot::Cone(br, [bx, by, bz], [tx, ty, tz]) creates a cone stretching from the base with radius br and center [b_x, b_y, b_z] to the top [t_x, t_y, t_z].

plot::Cone(br, [bx, by, bz], tr, [tx, ty, tz]) creates a conical frustum from the base center [b_x, b_y, b_z] to the top center [t_x, t_y, t_z]. The base radius is br, the top radius is tr.

→ Examples

Call:

plot::Cone(br, [bx, by, bz], <tr>, [tx, ty, tz], <a = amin .. amax>, Options)

Parameters:

br

the base radius of the cone. This must be a real numerical value or an arithmetical expression of the animation parameter a
br is equivalent to the attribute BaseRadius.

bx, by, bz

the lower center point. The coordinates bx, by, bz must be real numerical values or arithmetical expressions of the animation parameter a
bx, by, bz are equivalent to the attributes BaseX, BaseY, BaseZ.

tr

the top radius of the cone/conical frustum. This must be a real numerical value or an arithmetical expression of the animation parameter a. If no top radius is specified, a cone with top radius tr = 0 is created. 
tr is equivalent to the attribute TopRadius.

tx, ty, tz

the upper center point. The coordinates tx, ty, tz must be real numerical values orarithmetical expressions of the animation parameter a
tx, ty, tz are equivalent to the attributes TopX, TopY, TopZ.

Related Domains:

plot::Cylinder, plot::Prism, plot::Pyramid

Related Functions:

plot, plot::copy

Details:

Example 1

We draw a cone with base radius 6:

plot(plot::Cone(6, [0, 0, 0], [0, 0, 10])):

MuPAD graphics

Example 2

We create a conical frustum by specifying a non-zero top radius. Note that no discs are attached to the base and the top. You can look through the frustum:

br := 16: base := [3, 4, 5]:
tr:= 7: top := [11, 12, 13]:
plot(plot::Cone(br, base, tr, top, FillColor = RGB::Red)):

MuPAD graphics

We add the discs at the base and the top. Their normals n are given as the vector from the base to the top:

n := zip(top, base, _subtract):
plot(plot::Circle3d(br, base, n, Filled = TRUE),
     plot::Circle3d(tr, top, n, Filled = TRUE),
     plot::Cone(br, base, tr, top),
     LinesVisible = FALSE, FillColor = RGB::Red):

MuPAD graphics

delete br, base, tr, top, n:

Example 3

A tube or cylinder (in the mathematical sense, i.e., the lateral sides of a physical cylinder) is a special case of a conical frustum with the same top and bottom radius:

plot(plot::Cone(6, [0, 0, 0], 6, [11, 12, 13],
                FillColor = RGB::Yellow,
                LinesVisible = TRUE)):

MuPAD graphics

Example 4

Bottom and top radii and centers can be animated:

plot(plot::Cone(sin(a)^2, [sin(2*a), cos(2*a), 0],
                cos(a)^2, [cos(2*a), sin(2*a), 1],
                a = 0..PI, FillColor = RGB::Green)):

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