| Contents | Index |
plot::Prism(r,
,
) creates a prism with a regular base plane with a circumcircle of radius
and an axis from the point
to the point
.
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. |
|
x1, y1, z1: |
components of the base center: real numerical values or expressions of the animation parameter a. |
|
x2, y2, z2: |
components of the top center: real numerical values or expressions of the animation parameter a. |
Related Domains:
plot::Cone, plot::Cylinder, plot::Pyramid
Related Functions:
Details:
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.
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
, 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))


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 |