| Contents | Index |
plot::Pyramid(br, [bx, by, bz], [tx, ty, tz]) creates a pyramid stretching from the regular base plane with a circumcircle of radius
and center
to the top
.
plot::Pyramid(br, [bx, by, bz], tr, [tx, ty, tz]) creates a frustum of pyramid from the base with center
to the top with center
. The radius of the circumcircle of the regular base is br. The radius of the circumcircle of the regular top is tr.
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. |
|
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. |
|
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 |
|
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. |
Related Domains:
plot::Cone, plot::Cylinder, plot::Prism
Related Functions:
Details:
The optional “top radius” tr for creating a frustum may also be specified as the attribute TopRadius = tr.
Note that only pyramids with a regular base can be created with plot::Pyramid. For other bases, use a plot::SurfaceSet primitive.
Example 1
We draw a pyramid with base radius 6:
plot(plot::Pyramid(6, [0, 0, 0], [0, 0, 10])):

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)):

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)):


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))


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 |