point[] p; point[] c; point[] c2; [setup, 600, 600]{ p = new point[10]; c = new point[10]; c2 = new point[10]; for(int i = 0; i < p.length; ++i){ p[i] = new point(); c[i] = new point(); c2[i] = new point(); } } [paint]{ clearAll(); setColor(80,80,80); // drawLine(100,100,200,200); for(int i = 0; i < p.length-2; ++i){ drawBezierCurve(p[i],c2[i],c2[i],p[i+1]); } } [always]{ for(int i = 0; i < p.length-1; ++i){ if(i == 0) p[i].pushTo(mouse,10); else p[i].pushTo(p[i-1], 10); c[i].x = (p[i].x + p[i+1].x)/2; c[i].y = (p[i].y + p[i+1].y)/2; c2[i].pushTo(c[i],30); } }