pyramid - Maple Help

plottools

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

 Calling Sequence pyramid(options) pyramid(P, base=b, height=h, apex=a, options)

Parameters

 P - plot POLYGONS data structure or string understood by polygonbyname b - (optional) z-coordinate of the base of the pyramid; defaults to 0. h - (optional) height of the pyramid; defaults to 1. a - (optional) two entry list specifying the coordinate of the top of the pyramid from the base; defaults to the centroid of the points of P options - (optional) equations of the form option=value. For a complete list, see plot/options.

Description

 • The pyramid command takes a two-dimensional polygon and creates a three-dimensional regular pyramid of the height specified.
 • The option apex=a can be used to create an offset pyramid.
 • The plot data object produced by the pyramid 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):$

Default square pyramid

 > $\mathrm{display}\left(\mathrm{pyramid}\left(\right)\right)$

A triangular pyramid

 > $T≔\mathrm{polygon}\left(\left[\left[0,0\right],\left[2,1\right],\left[1,3\right]\right]\right):$
 > $\mathrm{display}\left(\mathrm{pyramid}\left(T\right),\mathrm{axes}=\mathrm{normal},\mathrm{scaling}=\mathrm{constrained}\right)$

Very skew hexagonal pyramid

 > $\mathrm{display}\left(\mathrm{pyramid}\left(\mathrm{polygonbyname}\left("hexagon"\right),\mathrm{apex}=\left[0.8,0.8\right]\right),\mathrm{scaling}=\mathrm{constrained}\right)$

The pyramid inherits plot properties from the base polygon.

 > $P≔\mathrm{polygonbyname}\left("heptagram",\mathrm{color}="Tan"\right):$
 > $\mathrm{display}\left(P,\mathrm{scaling}=\mathrm{constrained}\right)$

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

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

Properties such as color can also be specified in the pyramid command.

 > $\mathrm{display}\left(\mathrm{pyramid}\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}="Gold"\right),\mathrm{scaling}=\mathrm{constrained},\mathrm{orientation}=\left[-85,5,5\right]\right)$

Compatibility

 • The plottools[pyramid] command was introduced in Maple 2024.