plot::Prism

Prisms

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::Prism(r, [x1, y1, z1], [x2, y2, z2], <a = amin .. amax>, options)

Description

plot::Prism(r, [x1, y1, z1] , [x2, y2, z2] ) creates a prism with a regular base plane with a circumcircle of radius r and an axis from the point [x1, y1, z1] to the point [x2, y2, z2].

The base center and top center of the prism can also be passed as vectors.

Note that only prisms with a regular base can be created with plot::Prism. 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
Colorthe main colorRGB::Red
EdgesNumber of Edges3
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
Radiusradius of circles, spheres etc.1
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
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 plot three regular prisms with axes given by the coordinate axes:

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

Example 2

All parameters of a prism can be animated:

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

Example 3

The number of edges of the regular base plane of the prism are determined with the attribute Edges:

plot(plot::Prism(1, [0, 0, 0], [0, 0, 1], Edges = 7)):

Example 4

To create a crooked regular prism, the normal vector of its base plane is specified with the attribute Normal. If this attribute is set to [0, 0, 0], the axis between Base and Top ist used as normal vector:

plot(plot::Scene3d(plot::Pyramid(2,[0,0,0],1,[0,4,4], Normal=[0,0,0])),
     plot::Scene3d(plot::Pyramid(2,[0,0,0],1,[0,4,4], Normal=[0,0,1]))):

Example 5

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

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

Parameters

r

The radius of the circumcircle of the regular base plane: 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.

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