User Tools

Site Tools


en:poly

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:poly [2016/11/07 12:20]
admin
en:poly [2020/02/28 10:46]
Line 1: Line 1:
-===== Poly (Statement) ===== 
-==== Format ==== 
-**poly** [[arrays|variable[]]]\\ 
-**poly** ( [[arrays|variable[]]] )\\ 
-**poly** [[Lists|{ x1, y1, x2, y2, x3, y3 ... }]]\\ 
-**poly** [[Lists|{ {x1, y1}, {x2, y2}, {x3, y3} ... }]] 
  
-==== Description ==== 
-Draws a polygon.  The sides of the polygon are defined by the values stored in the array, which should be stored as x,y pairs, sequentially. The length of a one dimensional array/2 or the number of rows on a two dimensional array will define the number of points.  
- 
-One dimensional arrays and lists must have at least six values and an even number of values.  A two dimensional array may have 3 or more rows but must have two columns. 
- 
-==== Example ==== 
-<code> 
-# using an array 
-clg blue 
-color green 
-dim tri = {100, 100, 200, 200, 100, 200} 
-poly tri[] 
-</code> 
-<code> 
-# using a list 
-clg blue 
-color green 
-poly {{100, 100}, {200, 200}, {100, 200}} 
-</code> 
-Both programs use the poly statement to draw the following:\\ 
-{{:en:poly.png|}} 
- 
-==== See Also ==== 
-{{page>en:start#Graphics - Drawing&noheader}} 
- 
-==== History ====  
-|0.9.4|number of points in the array argument was removed from the poly statement| 
-|1.99.99.55|two dimensional list support was added| 
-|1.99.99.72|added required [] to passing variable array| 
en/poly.txt ยท Last modified: 2020/02/28 10:46 (external edit)