
PDE Download: Test04iTchenobyl.pde
JAVA Download: Test04iTchenobyl.java
Click on anar+ terms to get the documentation.
import processing.opengl.*;
import processing.opengl.*;
import anar.*;
/*
* Example for Anar library by Guillaume LaBelle + Julien Nembrini
* http://anar.ch
*/
Obj myObj;
void setup(){
size(800,400,OPENGL);
// this.hint(DISABLE_OPENGL_2X_SMOOTH);
Anar.init(this);
Anar.drawAxis();
Scene.myOpenGLBackground = true;
initForm();
}
void initForm(){
Pt a = Anar.Pt( -30,30,0);
Pt b = Anar.Pt(30,0,100);
myObj = new Revolve(new Pts(a,b),60);
Anar.slidersReset();
Anar.sliders(a);
Anar.sliders(b);
Anar.camTarget(myObj);
// println(myObj.parentList());
// String[] st = new String[1];
// st[0] = myObj.parentListGraphViz();
// saveStrings(this.getClass().getName()+".dot", st);
// Pts ncopy = new Pts(Anar.scene.actualView);
// ncopy.rotateZ(PI/2f);
// ncopy.stroke(255,0,0);
// myObj.add(ncopy);
Anar.add(myObj);
}
void draw(){
background(255);
myObj.draw();
}
// void keyPressed(){
// if(key==' ')
// initForm();
// if(key=='o')
// Anar.scene.actualView.ortho();
// if(key=='p')
// Anar.scene.actualView.unortho();
//
//
// }
void keyPressed(){
switch(key){
case ' ':
initForm();
break;
case 'o':
Anar.scene.actualView.ortho();
break;
case 'p':
Anar.scene.actualView.unortho();
break;
case 'i':
ObjExporter.export(Anar.main);
RhinoScript.export(Anar.main);
Autolisp.export(Anar.main);
SketchUpRuby.export(Anar.main);
PovRAY.export(myObj);
break;
case 'a':
println(Anar.main.toANSYS());
break;
}
}

|