Use the following function defined in the GraphicsFunctions.mthZG4ZTI utility file to draw a filled polygon in a 2D or 3D-plot window:


If u is a vector of 2D-vertices or a vector of 3D-vertices for a 2D-or a 3D-convex polygon (for a proper 3D-polygon all the vertices must lie in the same plane), POLYGON_FILL(u) will construct a closed polygon outline through the vertices of u and fill it with triangular areas based on the first vertex of u.  By carefully selecting the first vertex, some non-convex polygons can also be filled using POLYGON_FILL(u).


For POLYGON_FILL, use rectangular coordinates in 2D and 3D-plot windows together with the Options > Approximate Before Plotting optionEVZ132 turned on.  Also, use the 2D-plot windows Options > Display > Points command7CKH0ZT to connect points and make them of small size.  For example, plot the following in 2D and 3D-plot windows respectively:

POLYGON_FILL([-2, -2; 0, -3; 2, -1; 3, 2; 0, 3; -1, 2])

POLYGON_FILL(VECTOR(5·[0, COS(a), SIN(a)], a, 0, 2·pi, pi/10))


Other Graphics FunctionsZG4ZTI 

Created with the Personal Edition of HelpNDoc: Free EBook and documentation generator