draw_bezier
draw a bezier curve using 3 points x1,y1 x2,y2 x3,y3
Source code
var t,xx,yy;
xp=argument0;
yp=argument1;
t=0;
precision=20;
repeat(precision+1){
xx=(1-t)*(1-t)*argument0 + 2*t*(1-t)*argument2 + t*t*argument4;
yy=(1-t)*(1-t)*argument1 + 2*t*(1-t)*argument3 + t*t*argument5;
draw_line(xp,yp,xx,yy);
xp=xx;
yp=yy;
t+=1/precision;
}