import processing.opengl.*; import anar.*; /* * Example for Anar library by Guillaume LaBelle + Julien Nembrini * http://anar.ch */ Obj towerCore = new Obj(); Obj contourLines = new Obj(); Obj verticalLines = new Obj(); Obj windows = new Obj(); Obj structure = new Obj(); Obj rooms = new Obj(); Obj export = new Obj(); Sliders mySliders; boolean calculateWindows = true; boolean calculateVertical = true; void setup(){ size(800,400,OPENGL); Anar.init(this); // Setup DEFAULT rendering of our scene Pts.globalRender = new RenderPtsLine(); Anar.drawAxis(true); // Scene.lights = false; // anar.defaultScene = false; initForm(); } void initForm(){ // ////////////////////////////////////////// // ////////////////////////////////////////// // Initial SHAPE // Here, we create an arbitrary shape Face iShape; iShape = new Star(100,50,5); // ////////////////////////////////////////// // ////////////////////////////////////////// // LEVEL // The initial shape is duplicated Applying always the same predefined // Transformation Param numOfSubDivisionsOnEachSides = new Param(8); Transform combo = new Transform(); combo.translate(0,0,5); combo.scale(0.95f,0.985f,1.02f); combo.rotateZ(.06f); for (int i = 0; i<40; i++){ Face floorShape = new Face(iShape,combo); towerCore.add(floorShape); iShape = floorShape; } // ////////////////////////////////////////// // ////////////////////////////////////////// // VERTICALES if(calculateVertical){ for (int i = 0; i