import netscape.javascript.*; import processing.opengl.*; int cap=10000; // size of arrays float Px = 0.0; float Py = 0.0; // current mouse position int cam=0; int vertnum; int mode=0; int radius = 100; float[] x= new float[cap]; float[] y= new float[cap]; float[] z= new float[cap]; int vertprox=0; //index of close verts; int[] closeverts =new int[cap]; int[] triangles= new int[cap]; int trinum=0; int[] Vtable= new int[cap]; int[] Otable= new int[cap]; int bluecorn = 0; float[] xblue=new float[cap]; float[] yblue=new float[cap]; int bluecount=0; color black = color(0, 0, 0); color red = color(200, 0, 0); color green = color(0, 200, 0); color blue = color(0, 0, 200); color yellow = color(250, 250, 130); int count = 2; // number of original vertices int bi=0; // index of selected vertex int cornum=0; //index of current courner num int courcount= 2; void setup() { size(600, 600); // window size and 3D x[0]= 150.0; y[0]=150.0; x[1]= 200.0; y[1]=150.0; x[2]= 175.0; y[2]=175.0; Vtable[0]=1; Vtable[1]=3; Vtable[2]=2; for(int i=0; i100) { bi=0; bdtemp=600*600; for(int i=0; i<=courcount; i++) { if(Otable[i]==-1) { if(i<=2){order=i;} else {order=i%3;} if(order==0) { bdtemp=midist(i+1,i+2); } else if(order==1) { bdtemp=midist(i+1,i-1); } else { bdtemp=midist(i-2,i-1); } if(bdtemp