function param1() return "interval", 10, 100, 50 end function param2() return "color rnd", 0, 100, 50 end function main( x, y, p ) local w = bs_width_max() * 0.25 if w < 5 then w = 5 end if not firstDraw then local distance = bs_distance( lastDrawX - x, lastDrawY - y ) if distance < w * bs_param1()/20 then return 0 end end local dx,dy = bs_dir() local nx,ny = bs_normal() local r,g,b = bs_forebg( 1.0 - math.random()*bs_param2()/100 ) local idx = bs_grand(0,0.5)*w local rnd = 0.5 + math.random()+bs_param3()/50 local num = math.random( 0, 2 ) local i for i = 0,num do local rad = 3.14159 / 2 + 3.14159/math.random() local tdx = bs_grand( 0, 3.5 ) * w + bs_param3()/50 local len = math.random( 1, 2 ) * 3 bs_bezier_begin( 0, 0 ) bs_bezier_c( -0.08, -0.3, -0.06, -0.6, 0.0, -1.0 ) bs_bezier_c( 0.04, -0.4, 0.0, -0.15, 0.0, 0.0 ) bs_bezier_mul( w*len, w*len ) bs_bezier_rotate( rad ) bs_bezier_move( x, y ) bs_fill( r,g,b, 255 ) end lastDrawX = x lastDrawY = y firstDraw = false return 1 end lastDrawX = 0 lastDrawY = 0 firstDraw = true