plottools/triangulate - Maple Help

Home : Support : Online Help : plottools/triangulate

plottools

 triangulate
 triangulate plot data

 Calling Sequence triangulate(p, opts)

Parameters

 p - a POLYGONS or POINTS structure opts - zero or more options as described below.

Description

 • The triangulate command takes a POLYGONS or POINTS structure and returns a POLYGONS structure containing a set of triangles which cover the region defined by p.
 • If p is a POLYGONS structure, the result is a POLYGONS structure consisting only of triangles which covers the region defined by p. Note the polygons in the input p are not required to be convex.
 • If p is a POINTS structure, the result is a POLYGONS structure consisting only of triangles in which every point in p appears as a corner of some triangle.
 • The options opts should consist of options supported by plottools[polygon].

Examples

 > $\mathrm{with}\left(\mathrm{plottools}\right):$
 > $\mathrm{pts}≔\left[\left[391,374\right],\left[240,431\right],\left[252,340\right],\left[374,320\right],\left[289,214\right],\left[134,390\right],\left[68,186\right],\left[154,259\right],\left[161,107\right],\left[435,108\right],\left[208,148\right],\left[295,160\right],\left[421,212\right],\left[441,303\right]\right]$
 ${\mathrm{pts}}{≔}\left[\left[{391}{,}{374}\right]{,}\left[{240}{,}{431}\right]{,}\left[{252}{,}{340}\right]{,}\left[{374}{,}{320}\right]{,}\left[{289}{,}{214}\right]{,}\left[{134}{,}{390}\right]{,}\left[{68}{,}{186}\right]{,}\left[{154}{,}{259}\right]{,}\left[{161}{,}{107}\right]{,}\left[{435}{,}{108}\right]{,}\left[{208}{,}{148}\right]{,}\left[{295}{,}{160}\right]{,}\left[{421}{,}{212}\right]{,}\left[{441}{,}{303}\right]\right]$ (1)
 > $P≔\mathrm{plottools}:-\mathrm{polygon}\left(\mathrm{pts}\right)$
 ${\mathrm{POLYGONS}}{}\left({{\mathrm{_rtable}}}_{{36893628784772174300}}\right)$ (2)
 > $Q≔\mathrm{triangulate}\left(P,\mathrm{style}=\mathrm{line}\right)$
 ${\mathrm{POLYGONS}}{}\left(\left[\begin{array}{cc}391.0& 374.0\\ 240.0& 431.0\\ 252.0& 340.0\end{array}\right]{,}\left[\begin{array}{cc}161.0& 107.0\\ 435.0& 108.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}208.0& 148.0\\ 295.0& 160.0\\ 421.0& 212.0\end{array}\right]{,}\left[\begin{array}{cc}421.0& 212.0\\ 441.0& 303.0\\ 391.0& 374.0\end{array}\right]{,}\left[\begin{array}{cc}154.0& 259.0\\ 161.0& 107.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}391.0& 374.0\\ 252.0& 340.0\\ 374.0& 320.0\end{array}\right]{,}\left[\begin{array}{cc}134.0& 390.0\\ 68.0& 186.0\\ 154.0& 259.0\end{array}\right]{,}\left[\begin{array}{cc}134.0& 390.0\\ 154.0& 259.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}289.0& 214.0\\ 134.0& 390.0\\ 208.0& 148.0\end{array}\right]{,}\left[\begin{array}{cc}421.0& 212.0\\ 391.0& 374.0\\ 374.0& 320.0\end{array}\right]{,}\left[\begin{array}{cc}289.0& 214.0\\ 208.0& 148.0\\ 421.0& 212.0\end{array}\right]{,}\left[\begin{array}{cc}421.0& 212.0\\ 374.0& 320.0\\ 289.0& 214.0\end{array}\right]{,}{\mathrm{STYLE}}{}\left({\mathrm{LINE}}\right)\right)$ (3)
 > 

Compatibility

 • The plottools[triangulate] command was introduced in Maple 2020.
 • For more information on Maple 2020 changes, see Updates in Maple 2020.