Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 122 - 2505_CoreGPT(Podar)_Flipbook_C7
P. 122

    POLY Statement

                      The POLY statement draws multi-sided shapes by joining the specified points. This allows you to
                      create more complex shapes with multiple sides and angles.

                      Syntax:

                      POLY  {x1, y1, x2, y2, ..., xn, yn}
                          ✶  x1, y1, x2, y2, ..., xn, yn: Coordinates of the vertices of the polygon (the points where the

                           sides meet).

                      Program 13: To draw a triangle.

                      This program demonstrates how to draw a triangle using three points on the screen.

                      Program 14: To draw a coloured pentagon.

                      This  program  demonstrates  how  to  draw  a  pentagon  using  five  specified  points  with  blue
                      colour.

                    120     Premium Edition-VII

| 117 118 119 120 121 122 123 124 125 126 127 |