@@ -0,0 +1,1754 @@
+package stephaneag.epocprotocomp;%0A%0Aimport processing.core.*; // import the Processing 'core' .jar ( requires 'right-click %3E BUILD PATH --%3E ADD TO BUILD PATH' )%0A%0Apublic class EpocProtoGrapherRenderer %7B%0A%09// the headless Processing Applet to wich we will be drawing to%0A%09private PApplet _prApplet = null;%0A%09// the graphic context of the Pr Applet ( all drawings will be performed on this obj ( a PGraphic ) )%0A%09private PGraphics _context = null;%0A%09%0A%09// the %5Bblank%5D constructor%0A%09EpocProtoGrapherRenderer()%7B%0A%09%09// intentionally left blank (..)%0A%09%7D // end constructor%0A%09%0A%09void initialise(int width, int height)%7B%0A%09%09// create a Processing Applet & retrieve its graphic context%0A%09%09_prApplet = new PApplet();%0A%09%09_context = _prApplet.createGraphics(width, height, PApplet.P3D);%0A%09%09_prApplet.g = _context; // 'g' stands for 'GraphicContext'%0A%09%7D // initialise%0A%09%0A%09// fcn that performs the drawing operations & save the results to an image%0A%09void render(String filename)%7B%0A%09%09if( _prApplet == null %7C%7C _context == null )%7B%0A%09%09%09System.out.println(%22Error: EpocProtoGrapherRenderer::render() %3E%3E call 'initialise()' before 'render()' .%22);%0A%09%09%09return;%0A%09%09%7D%0A%09%09%0A%09%09// DRAWING OPERATIONS PART //%0A%09%09%09%0A%09%09%09// tell the context that we're starting to draw%0A%09%09%09_context.beginDraw();%0A%09%09%09%0A%09%09%09// perform the drawing using normal Pr mthds%0A%09%09%09_context.background(0);%0A%09%09%09_context.noStroke();%0A%09%09%09_context.beginShape();%0A%09%09%09%09_context.vertex( 100, 100);%0A%09%09%09%09_context.vertex( 300, 100);%0A%09%09%09%09_context.fill(0);%0A%09%09%09%09_context.vertex( 300, 300);%0A%09%09%09%09_context.vertex( 100, 300);%0A%09%09%09_context.endShape();%0A%09%09%09%0A%09%09%09// tell the conyexy that we're finished drawing%0A%09%09%09_context.endDraw();%0A%09%09%09%0A%09%09%09// save the contents of the rendering context to a file%0A%09%09%09_context.save(filename);%0A%09%7D // render%0A%7D // class EpocProtoGrapherRenderer%0A

Create EpocProtoGrapherRenderer.java