# polytest.kbs
# draw polygons using arrays and direct lists
clg
color gray

dim a(6)
a[0] = 10
a[1] = 30
a[2] = 25
a[3] = 40
a[4] = 0
a[5] = 0

circle (5,5,15)
color blue
poly a[]

# draw red one on top of the blue one
pause 1
color red
poly {10,30,24,40,0,0}

pause 1
color blue
for x = 45 to 55 step 5
 poly {1/x, 2 * x, x-40, x + 30, 7, 8}
next x

# pause and overlay immediate with same polygon from array
pause 1
color red
a[0] = 1/x
a[1] = 2 * x
a[2] = x-40
a[3] = x + 30
a[4] = 7
a[5] = 8
poly a[]

