function param1() return "interval", 10, 100, 15 end function main( x, y, p ) local w = bs_width_max() if w < 1 then w = 1 end if firstDraw then firstDrawX = x firstDrawY = y end if not firstDraw then local distance = bs_distance( lastDrawX - x, lastDrawY - y ) if distance < w * bs_param1()/10 then return 0 end end local r,g,b = bs_fore() local ax = math.abs( x - lastDrawX ) local ay = math.abs( y - lastDrawY ) if ax > ay then bs_ellipse( x,firstDrawY, w, w, 0, r,g,b, 255 ) else bs_ellipse( firstDrawX,y, w, w, 0, r,g,b, 255 ) end lastDrawX = x lastDrawY = y firstDraw = false return 1 end firstDrawX = 0 firstDrawY = 0 lastDrawX = 0 lastDrawY = 0 firstDraw = true