import processing.opengl.*; import anar.*; // import java.util.*; /* * Example for Anar library by Guillaume LaBelle + Julien Nembrini * http://anar.ch */ Obj obj; Sliders mySlider; void setup(){ size(800,400,OPENGL); Anar.init(this); initForm(); } void initForm(){ int numOfSides = 20; int numOfLoops = 10; float theta = 2*PI/ (numOfSides*2); // starting point Pt a = Anar.Pt(100,0); Pt b = Anar.Pt(50,0); // rotation RotateZ rot = new RotateZ(theta); b.apply(rot); Translate t = new Translate(0,0,1); Scale s = new Scale(.99f,.99f,.99f); // construction of shape obj = new Obj(); // create square Pts f = new Pts(); f.add(a); f.add(b); for (int i = 0; i