A polygon is a closed area. It can be irregular, where the points are anywhere, or they can be regular, which means they are equiangular and equilateral like in this picture.
Kodular included a DrawPolygon method recently but for now it clears the canvas everytime is used, deleting anything in it except for sprites. Until that is fixed, this procedure might be of help if you need to keep your previous canvas content when drawing a polygon.
App Inventor and Kodular both has a method to draw irregular polygons, both in the canvas and in the maps.
Using that method, this procedure will let you draw a REGULAR POLYGON almost the same way you use the circle method, by specifying the center and the radius. But you also need the number of sides, the starting angle (which is a rotation so you can change the “orientation” or “heading” of the polygon) and a boolean entry to have the polygon filled (true) or just the outline (false).
I hope you can find this procedure useful in your apps.
DrawRegularPolygon_procedure.aia (3.1 KB)
(For using in maps, replace the Canvas.DrawShape procedure for the map one).