Skip to Main Content Skip to Search
Product Documentation

plot::Prismprisms

plot::Prism(r, [x_1, y_1, z_1], [x_2, y_2, z_2]) creates a prism with a regular base plane with a circumcircle of radius r and an axis from the point [x_1, y_1, z_1] to the point [x_2, y_2, z_2].

→ Examples

Call:

plot::Prism(r, [x1, y1, z1], [x2, y2, z2], <a = amin .. amax>, Options)

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.

Related Domains:

plot::Cone, plot::Cylinder, plot::Pyramid

Related Functions:

plot, plot::copy

Details:

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

MuPAD graphics

Example 2

All parameters of a prism can be animated:

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

MuPAD graphicsimage

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

MuPAD graphics

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

MuPAD graphics

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

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