void aiExport(){ ai.turnTransparencyOn(); ai.setLineWeight( 0.25 ); ai.ai_ellipseMode(CENTER); //tracer ai.ai_stroke(0,0,0,155); for(int i = 0; i < make.vector.length; i++){ ai.ai_fill(0,0,0,100); ai.ai_ellipse(make.vector[i].x*width,make.vector[i].y*height,20,20); //ai.ai_fill(0); //text(i,make.vector[i].x*width,make.vector[i].y*height); } ai.ai_fill(0,0,0,20); ai.ai_beginShape(POLYGON); for(int i = 0; i < make.vector.length; i++){ if(i < polyLimit+1) ai.ai_vertex(make.vector[i].x*width,make.vector[i].y*height); } ai.ai_endShape(); //neural net ai.ai_fill(255); ai.ai_stroke(255,0,0); for(int i = 0; i < net.gn.length; i++){ ai.ai_ellipse((float)(net.gn[i].wx)*width, (float)(net.gn[i].wy)*height,4,4); } for(int i = 0; i < net.H; i++) for(int j = 1; j < net.W; j++){ ai.ai_line((float)(net.gn[(j-1)+(i*net.H)].wx)*width, (float)(net.gn[(j-1)+(i*net.H)].wy)*height,(float)(net.gn[(j)+(i*net.H)].wx)*width, (float)(net.gn[(j)+(i*net.H)].wy)*height); ai.ai_line((float)(net.gn[(i)+((j-1)*net.H)].wx)*width, (float)(net.gn[(i)+((j-1)*net.H)].wy)*height,(float)(net.gn[(i)+(j*net.H)].wx)*width, (float)(net.gn[(i)+(j*net.H)].wy)*height); } //vectorImage if(vectorImage != null){ for(int i = 0; i < vectorImage.length; i++){ ai.ai_stroke(0,255,0,255); ai.ai_noFill(); ai.ai_ellipse(vectorImage[i].x*width,vectorImage[i].y*width,18,18); //ai.ai_fill(0,180,0); //text(i,vectorImage[i].x*width,vectorImage[i].y*width); } fill(0,255,0,20); ai.ai_beginShape(POLYGON); for(int i = 0; i < polyLimit+1; i++) ai.ai_vertex(vectorImage[i].x*width,vectorImage[i].y*height); ai.ai_endShape(); } }