 polygonplot3d - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Graphics : 3-D : plots/polygonplot3d

plots

 polygonplot3d
 create a plot of one or more polygons Calling Sequence polygonplot3d(L, options) polygonplot3d(A, options) polygonplot3d(v1, v2, v3, options) Parameters

 L - list of polygon vertices, each given as a 3-element list A - n by 3 Matrix, where n is any positive integer v1, v2, v3 - Vectors, all of the same length options - (optional) equations of the form option=value, where option is any of the available 3d plot options, or useunits Description

 • The polygonplot3d command is used to create a 3-D plot of a polygon. The polygon's vertices are provided as the list L, the Matrix A, or the Vectors v1 and v2.
 • The list L must contain 3-element lists or Vectors [x, y, z], each representing the numeric x-, y- and z-coordinates of a vertex, optionally with units.
 • The Matrix must be n by 3, where n is any positive integer. Each row of the Matrix contains the x-, y- and z-coordinates of a vertex, optionally with units. If a 3 by n Matrix is given, with n not equal to 3, then it will be automatically transposed. The Vectors, representing the x-coordinates, y-coordinates, and z-coordinates respectively, again optionally with units, can have any length, but all must have the same length.
 • The option useunits=[ux, uy, uz] specifies the units to be used on the x-, y-, and z-axis, respectively. By default, Maple picks a suitable unit of a dimension appropriate for the data. It is typically the units given for the first point. All data are converted to this unit and the unit is used as the label for the axis, unless labels are specified using the labels option. (See plot3d/options for the labels option.) If you want to specify the unit for some but not all of the three axes and let Maple pick the others, you can specify the ones you don't want to choose as "default" or default. If not all values given for a particular coordinate axis can be converted to the appropriate unit (specified or default), Maple issues an error.
 • Remaining arguments are interpreted as options which are specified as equations of the form option = value. These options are the same as those available for the plot3d command, as described in plot3d options.
 • Multiple polygons can be plotted by providing a list containing polygons in the list or Matrix form, as described above. In this case, the color option value can be a list of n colors, where n is the number of polygons. Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $\mathrm{polygonplot3d}\left(\mathrm{Matrix}\left(\left[\left[0,1,1\right],\left[1,-1,2\right],\left[3,0,5\right],\left[1,1,1\right]\right],\mathrm{datatype}=\mathrm{float}\right),\mathrm{color}="Indigo",\mathrm{axes}=\mathrm{boxed}\right)$ > $\mathrm{another_poly}≔\left[\mathrm{seq}\left(\left[\mathrm{cos}\left(\frac{\mathrm{\pi }T}{40}\right),\mathrm{sin}\left(\frac{\mathrm{\pi }T}{40}\right),\frac{T}{40}\right],T=0..40\right)\right]:$
 > $\mathrm{polygonplot3d}\left(\mathrm{another_poly}\right)$ > $\mathrm{list_polys}≔\left[\mathrm{seq}\left(\left[\mathrm{seq}\left(\left[\frac{T}{10},\frac{S}{20},\mathrm{sin}\left(\frac{TS}{20}\right)\right],T=0..20\right)\right],S=1..4\right)\right]:$
 > $\mathrm{polygonplot3d}\left(\mathrm{list_polys},\mathrm{color}=\left["Blue","Purple","HotPink","Pink"\right]\right)$ The default units for this input are meters, seconds, and kilograms.

 > $\mathrm{v4}≔⟨2\mathrm{Unit}\left(m\right),3\mathrm{Unit}\left(\mathrm{ft}\right),4\mathrm{Unit}\left(\mathrm{dm}\right)⟩$
 ${\mathrm{v4}}{≔}\left[\begin{array}{c}{2}{}⟦{m}⟧\\ {3}{}⟦{\mathrm{ft}}⟧\\ {4}{}⟦{\mathrm{dm}}⟧\end{array}\right]$ (1)
 > $\mathrm{v5}≔⟨200\mathrm{Unit}\left(s\right),2\mathrm{Unit}\left(\mathrm{min}\right),0.1\mathrm{Unit}\left(h\right)⟩$
 ${\mathrm{v5}}{≔}\left[\begin{array}{c}{200}{}⟦{s}⟧\\ {2}{}⟦{\mathrm{min}}⟧\\ {0.1}{}⟦{h}⟧\end{array}\right]$ (2)
 > $\mathrm{v6}≔⟨0.1\mathrm{Unit}\left(\mathrm{kg}\right),8\mathrm{Unit}\left(\mathrm{oz}\right),0.8\mathrm{Unit}\left(\mathrm{lb}\right)⟩$
 ${\mathrm{v6}}{≔}\left[\begin{array}{c}{0.1}{}⟦{\mathrm{kg}}⟧\\ {8}{}⟦{\mathrm{oz}}⟧\\ {0.8}{}⟦{\mathrm{lb}}⟧\end{array}\right]$ (3)
 > $\mathrm{polygonplot3d}\left(\mathrm{v4},\mathrm{v5},\mathrm{v6}\right)$ If we want to display the points in feet, minutes, and ounces, we can specify that as follows.

 > $\mathrm{polygonplot3d}\left(\mathrm{v4},\mathrm{v5},\mathrm{v6},\mathrm{useunits}=\left[\mathrm{Unit}\left(\mathrm{ft}\right),\mathrm{Unit}\left(\mathrm{min}\right),\mathrm{Unit}\left(\mathrm{oz}\right)\right]\right)$ If we are fine with meters on the x-axis and kilograms on the z-axis, but want minutes on the y-axis, we can use this.

 > $\mathrm{polygonplot3d}\left(\mathrm{v4},\mathrm{v5},\mathrm{v6},\mathrm{useunits}=\left["default",\mathrm{Unit}\left(\mathrm{min}\right),"default"\right]\right)$ If we try to specify the x-axis as kilograms and the y-axis as newtons, an error is issued.

 > $\mathrm{polygonplot3d}\left(\mathrm{v4},\mathrm{v5},\mathrm{v6},\mathrm{useunits}=\left[\mathrm{Unit}\left(\mathrm{kg}\right),\mathrm{Unit}\left(N\right),"default"\right]\right)$

 See Also