plot::Pyramid

Pyramids and frustums of pyramids

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

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

Description

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 [bx, by, bz] to the top [tx, ty, tz].

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

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.

Attributes

AttributePurposeDefault Value
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
Anglerotation angle0
Basebase center of cones, cylinders, pyramids and prisms[0, 0, 0]
BaseXx-coordinate of top center of cones, cylinders, pyramids and prisms0
BaseYy-coordinate of top center of cones, cylinders, pyramids and prisms0
BaseZz-coordinate of top center of cones, cylinders, pyramids and prisms0
BaseRadiusbase radius of cones/conical frustums and pyramids/frustums of pyramids1
Colorthe main colorRGB::Red
EdgesNumber of Edges4
Filledfilled or transparent areas and surfacesTRUE
FillColorcolor of areas and surfacesRGB::Red
FillColor2second color of areas and surfaces for color blendsRGB::CornflowerBlue
FillColorTypesurface filling typesDichromatic
FillColorFunctionfunctional area/surface coloring 
FillColorDirectionthe direction of color transitions on surfaces[0, 0, 1]
FillColorDirectionXx-component of the direction of color transitions on surfaces0
FillColorDirectionYy-component of the direction of color transitions on surfaces0
FillColorDirectionZz-component of the direction of color transitions on surfaces1
Framesthe number of frames in an animation50
Legendmakes a legend entry 
LegendTextshort explanatory text for legend 
LegendEntryadd this object to the legend?FALSE
LineColorcolor of linesRGB::Black.[0.25]
LineWidthwidth of lines0.35
LineColor2color of linesRGB::DeepPink
LineStylesolid, dashed or dotted lines?Solid
LinesVisiblevisibility of linesTRUE
LineColorTypeline coloring typesFlat
LineColorFunctionfunctional line coloring 
LineColorDirectionthe direction of color transitions on lines[0, 0, 1]
LineColorDirectionXx-component of the direction of color transitions on lines0
LineColorDirectionYy-component of the direction of color transitions on lines0
LineColorDirectionZz-component of the direction of color transitions on lines1
Namethe name of a plot object (for browser and legend) 
Normalnormal vector of circles and discs, etc. in 3D[0, 0, 0]
NormalXnormal vector of circles and discs, etc. in 3D, x-component0
NormalYnormal vector of circles and discs, etc. in 3D, y-component0
NormalZnormal vector of circles and discs, etc. in 3D, z-component0
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
PointSizethe size of points1.5
PointStylethe presentation style of pointsFilledCircles
PointsVisiblevisibility of mesh pointsFALSE
Shadingsmooth color blend of surfacesSmooth
TimeEndend time of the animation10.0
TimeBeginstart time of the animation0.0
TimeRangethe real time span of an animation0.0 .. 10.0
Titleobject title 
TitleFontfont of object titles[" sans-serif ", 11]
TitlePositionposition of object titles 
TitleAlignmenthorizontal alignment of titles w.r.t. their coordinatesCenter
TitlePositionXposition of object titles, x component 
TitlePositionYposition of object titles, y component 
TitlePositionZposition of object titles, z component 
Toptop center of cones, cylinders, pyramids and prisms[0, 0, 1]
TopXbase and top center of cones, cylinders, pyramids and prisms0
TopYbase and top center of cones, cylinders, pyramids and prisms0
TopZbase and top center of cones, cylinders, pyramids and prisms1
TopRadiustop radius of cones/conical frustums and pyramids/frustums of pyramids0
VisiblevisibilityTRUE
VisibleAfterobject visible after this time value 
VisibleBeforeobject visible until this time value 
VisibleFromToobject visible during this time range 
VisibleAfterEndobject visible after its animation time ended?TRUE
VisibleBeforeBeginobject visible before its animation time starts?TRUE

Examples

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

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.

a

Animation parameter, specified as a = amin..amax, where amin is the initial parameter value, and amax is the final parameter value.

See Also

MuPAD Functions

MuPAD Graphical Primitives