#! lua
-- Example to show use of draw library
math = require "math"
math.randomseed (1)
local rnd = math.random
local draw = require "draw"

     local rgb in draw

-- coordinates
     local A, B, C = 0x80000, 0x50000, 0x1000
     local x, y, r = A/2, B/2, A/3

     local N = 24

     local oevre = draw.create ( )  -- create draw object

--  define path objects
--  the order determines the layer

   local   c = { }
   for i = 1,N do
     c[i] = oevre:path {
         fill = rgb (rnd (192), 64 + rnd (192), 64 + rnd (192));
         outline = -1;
                        }
     local p = c[i]
     p:circle (x + (4*i*C)//N, y, 10*r//(5+7*i))
     p:END ( )
   end -- for


-- save as a drawfile and run it
     oevre:save (nil, "run")

