This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

anar+

by   LaBelle + Nembrini
©2008

built with ( )
   examples index
Rotate: middle click or key[1]
Zoom in|out: wheel button or key[2]
AutoRotate: key[5]
(First Click inside the applet to enable keys)

This applet use OpenGL, you might have to install extra jogl libraries once to view this applet. You may have a look at image capture and video at the bottom of this page. You might accept security security permenently to remove the security prompts on each pages.



sourcecode


   PDE Download:   OOG01cSquare01d.pde
   JAVA Download:   OOG01cSquare01d.java


Click on anar+ terms to get the documentation.

import processing.opengl.*;
import anar.*;
 
 
 
 
 
 
 
Obj myObj;
 
 
void setup() {
  size(800, 400, OPENGL);
Anar.init(this);
 
initForm();
}
 
 
void initForm() {
//Create a new Object to store our shape
myObj = new Obj();  
 
//Create a first point with absolute coordinates    
Pt a = Anar.Pt(0,0);
 
//Create a Translation
TranslateX tx = new TranslateX(120);
Translate ty = new Translate(0.001f,120);
 
//Create a first line
Pts ps1 = new Pts();
ps1.add(a);
ps1.add(Anar.Pt(ps1.ptEnd(),tx));
 
Pts ps2 = new Pts(ps1,ty);
 
 
 
Face square = new Face();
square.add(ps1);
square.add(ps2.reverse());
 
 
//Store mySquare in our object
myObj.add(square);
 
//Create Sliders based on an object
Anar.sliders(myObj);  
 
String[] st = new String[1];
st[0] =  myObj.parentListGraphViz();
saveStrings(this.getClass().getName()+".dot", st);   
}
 
 
void draw() {
background(150);
myObj.draw();
}
 



screenshots