This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.


Recursive construction of Bezier curves
Edit the control polygon ('m') or the parameter ('x'). Insert ('i') or delete (d) control points.
Builtby Jarek Rossignac with Processing. zip

Code to trace a degree n-1 Bezier curve defined by control points P[0]...P[n-1]:
beginShape(); for(float s=0; s<=1; s+=0.01) bez(0,s,n-1).v(); endShape();
pt bez(int i, float t, int r) {if(r==0) return P[i]; return L(bez(i,t,r-1),t,bez(i+1,t,r-1));}
pt L(pt A, float s, pt B) {return P(A.x+s*(B.x-A.x),A.y+s*(B.y-A.y)); };