// ------------------------------\\ // spiral moire \\ // object oriented Proce55ing \\ // mikkel . crone . koser \\ // http://www.beyondthree.com \\ // a p r i l 6 t h 2 0 0 3 \\ // ported to rev. 0060 09.2003 \\ // ------------------------------\\ kasse[] KasseListe; int num = 180; int alpha = 10; void setup(){ size(360, 360); background(0); noStroke(); // make kasseListe KasseListe = new kasse[num]; // make kasse-objects for(int i = 0; i < num; i++){ KasseListe[i] = new kasse(0, i, i, 20, alpha); // x, y, width, height, alpha } } void loop(){ background(0); translate(180, 180); for(int i = 0; i < num; i++){ // horisontal KasseListe[i].update(); KasseListe[i].draw(); } } class kasse{ int x, y, w, h, a; int r,g,b; int count = 1; // Constructor kasse(int _x, int _y, int _w, int _h, int _a){ x = _x; // X-position y = _y; // Y-position w = _w; // width h = _h; // height a = _a; // alpha } // Custom method for updating variables void update(){ //count++; //rotateZ(millis()/50000.0000); rotateZ((mouseX-180)/10000.0000); rotateY((mouseY-180)/10000.0000); //rotateX(millis()/50000.0000); // COLOUR r = 255; //24; g = 255; //94; b = 255; //24; fill(r, g, b, a); } // Custom method for drawing the object void draw(){ rect(x, y, w, h); } }