Skip to Main Content Skip to Search
Product Documentation

plot::Pyramidpyramids and frustums of pyramids

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

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

→ Examples

Call:

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

Parameters:

br

the radius of the circumcircle of the regular base. 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 radius of the circumcircle of the regular top of the frustum of pyramid. This must be a real numerical value or an arithmetical expression of the animation parameter a. If no top radius is specified, a pyramid 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 or arithmetical expressions of the animation parameter a
tx, ty, tz are equivalent to the attributes TopX, TopY, TopZ.

Related Domains:

plot::Cone, plot::Cylinder, plot::Prism

Related Functions:

plot, plot::copy

Details:

Example 1

We draw a pyramid with base radius 6:

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

MuPAD graphics

Example 2

We create a frustum of pyramid by specifying a non-zero top radius:

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

MuPAD graphics

delete br, base, tr, top, n:

Example 3

Bottom and top radii and centers can be animated:

plot(plot::Pyramid(sin(a)^2, [sin(2*a), cos(2*a), 0],
                cos(a)^2, [cos(2*a), sin(2*a), 1],
                a = 0..PI)):

MuPAD graphicsimage

Example 4

Additionally, the orientation of the edges of the base can be changed with the rotation angle Angle:

plot(plot::Pyramid(1/2, Angle=0),
     plot::Pyramid(1/2, Angle=PI/4, FillColor2=RGB::Yellow))

MuPAD graphics

  


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