int[] S = new int [scap]; // indices to resampled vertices on the computed polyloop int sn =0; // number of samples void drawSamples() {stroke(blue); for (int i=0; i C[S[i]].disTo(C[S[xp(i)]]) ) S[i]=sn(S[i]); else S[i]=sp(S[i]) ; } void copySamples() { int m=svn+1; int mi=0; for (int i=0; i