/* ---------------------------------------------------------------- Copyright (C) 2005 Ricard Marxer Piñón email (at) ricardmarxer.com http://www.ricardmarxer.com/ ---------------------------------------------------------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ---------------------------------------------------------------- Built with Processing (Beta) v098 uses Geomerative (Alpha) v004 ---------------------------------------------------------------- Created 17 January 2006 ---------------------------------------------------------------- pedazos ---------------------------------------------------------------- */ //import processing.opengl.*; import geomerative.*; RFont f; String STRNG[] = {"SATOR","AREPO","TENET","OPERA","ROTAS"}; //String STRNG[] = {"sator","arepo","tenet","opera","rotas"}; //String STRNG[] = {"999","996","966","969","696","996","966","666"}; //String STRNG[] = {"A","I"}; float SMOOTHNESS = 0.2; //------------------------ Runtime properties ---------------------------------- // Save each frame boolean SAVEVIDEO = false; boolean SAVEFRAME = false; boolean APPLICATION = false; String DEFAULTAPPLETRENDERER = P3D; int DEFAULTAPPLETWIDTH = 680; int DEFAULTAPPLETHEIGHT = 480; String DEFAULTAPPLICRENDERER = OPENGL; int DEFAULTAPPLICWIDTH = 800; int DEFAULTAPPLICHEIGHT = 600; //------------------------------------------------------------------------------ String FONT = "FreeSans.ttf"; int MARGIN = 100; float angle = 0; int lngth; int strind = 0; boolean saved = false; RPolygon polys[]; RPolygon polysnext[]; RPolygon pinter[]; RPolygon pdiff[]; RPolygon pdiffinv[]; void setup(){ int w = DEFAULTAPPLICWIDTH, h = DEFAULTAPPLICHEIGHT; String r = DEFAULTAPPLICRENDERER; if(!APPLICATION){ // Specify the widtha and height at runtime w = int(param("width")); h = int(param("height")); r = (String)param("renderer"); // (String) will return null if param("renderer") doesn't exist if (r != OPENGL && r != P3D && r != JAVA2D && r != P2D) { r = DEFAULTAPPLETRENDERER; } // int() will return 0 if param("width") doesn't exist if (w <= 0) { w = DEFAULTAPPLETWIDTH; } // int() will return 0 if param("height") doesn't exist if (h <= 0) { h = DEFAULTAPPLETHEIGHT; } } size(w,h,r); try{ smooth(); }catch(Exception e){} framerate(24); background(255); if(r==P3D) ortho(-width/2,width/2,-height/2,height/2,-100,100); f = new RFont(this,FONT,372, RFont.CENTER); lngth = STRNG[strind].length(); polys = new RPolygon[lngth]; polysnext = new RPolygon[lngth]; pinter = new RPolygon[lngth]; pdiff = new RPolygon[lngth]; pdiffinv = new RPolygon[lngth]; int strindnext = (strind + 1) % STRNG.length; for(int i=0;i=TWO_PI){ angle = 0; int strindnext = (strind + 1) % STRNG.length; for(int i=0;i