// ------------------------------------------------------------------ // Push Pop // by REAS // ported by Philipp Seifried // This code is a quick port of a Processing example and not optimised // for performance. // Remember that for this to work, you will also need the // JOGL classes to be found at // https://jogl.dev.java.net/ // For instructions, refer to // http://www.repeatwhiletrue.com/p5/P5JOGL.html // ------------------------------------------------------------------ Frame oglFrame; // our openGL Window GLCanvas canvas; // the component openGL will render to JOGLRenderer renderer; // our custom event listener that will do the rendering boolean fullscreen; KeyInputHandler keyHandler; MouseInputHandler mouseHandler; int oglMouseX, oglMouseY, oglPMouseX, oglPMouseY; // ----------------- Add your own stuff here! float a; // Angle of rotation float offset = 180/24; // Angle offset between boxes int num = 12; // Number of boxes color[] colors = new color[num]; // Colors of each box color safecolor; // ------------------------------------------ void setup() { // ----------------- Add your own stuff here! size(320,240); fullscreen = false; framerate(30); safecolor = color(153, 153, 153); for(int i=0; i= 720) { // if(a >= TWO_PI*2) a = 0.0; } for(int i=0; i