prism - Maple Help

plottools

 prism
 generate 3-D prism plot object from a 2-D polygon

 Calling Sequence prism(P, options) prism(P, base=b, height=h, displacement=d, options)

Parameters

 P - plot POLYGONS data structure b - (optional) z-coordinate of the base of the prism; defaults to 0. h - (optional) height of the prism; defaults to 1. d - (optional) two entry list specifying the [x,y] displacement of the top of the prism from the base; defaults to [0,0]. options - (optional) equations of the form option=value. For a complete list, see plot/options.

Description

 • The prism command takes a two-dimensional polygon plot structure and creates a three-dimensional regular prism of the height specified.
 • The option displacement=d can be used to create an oblique prism.
 • The plot data object produced by the prism command can be used in a PLOT3D data structure or displayed using the plots[display] command.

Examples

 > $\mathrm{with}\left(\mathrm{plottools}\right):$
 > $\mathrm{with}\left(\mathrm{plots}\right):$

A triangular prism

 > $T≔\mathrm{polygon}\left(\left[\left[0,0\right],\left[2,1\right],\left[1,3\right]\right]\right):$
 > $\mathrm{display}\left(\mathrm{prism}\left(T\right),\mathrm{axes}=\mathrm{normal},\mathrm{scaling}=\mathrm{constrained}\right)$
 > $P≔\mathrm{sector}\left(\left[0,0\right],2,0..\frac{3\mathrm{\pi }}{4},\mathrm{color}="DarkRed"\right):$

Graph of the sector $P$

 > $\mathrm{display}\left(P,\mathrm{scaling}=\mathrm{constrained}\right)$

Graph of a prism with base $P$ and height 0.5

 > $\mathrm{display}\left(\mathrm{prism}\left(P,\mathrm{height}=0.5\right),\mathrm{scaling}=\mathrm{constrained}\right)$
 > $Q≔\mathrm{sector}\left(\left[0,0\right],2,\frac{3\mathrm{\pi }}{4}..\frac{5\mathrm{\pi }}{4},\mathrm{color}="DarkBlue"\right):$
 > $R≔\mathrm{sector}\left(\left[0,0\right],2,\frac{5\mathrm{\pi }}{4}..2\mathrm{\pi },\mathrm{color}="DarkGreen"\right):$
 > $\mathrm{display}\left(\left[\mathrm{prism}\left(P,\mathrm{height}=2\right),\mathrm{prism}\left(Q,\mathrm{base}=0.5\right),\mathrm{prism}\left(R,\mathrm{base}=0.75,\mathrm{height}=0.5,\mathrm{displacement}=\left[0,-0.5\right]\right)\right],\mathrm{scaling}=\mathrm{constrained}\right)$
 > $\mathrm{display}\left(\mathrm{prism}\left(\mathrm{polygon}\left(\left[\left[0,1\right],\left[0,2\right],\left[0.5,2.75\right],\left[1.25,3\right],\left[2,2.75\right],\left[2.5,2.25\right],\left[1.75,1.5\right],\left[2.5,0.75\right],\left[2,0.25\right],\left[1.25,0\right],\left[0.5,0.25\right]\right]\right),\mathrm{color}="Orchid"\right),\mathrm{scaling}=\mathrm{constrained}\right)$

Compatibility

 • The plottools[prism] command was introduced in Maple 16.