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:   Test04pFree.pde
   JAVA Download:   Test04pFree.java


Click on anar+ terms to get the documentation.

import processing.opengl.*;
import anar.*;
 
 
 
 
 
/*
 * Example for Anar library by Guillaume LaBelle + Julien Nembrini
 * http://anar.ch
 */
 
 
boolean record = false;
 
 
Obj     form   = new Obj();
 
Sliders mySliders;
 
 
void setup(){
    size(800,400,OPENGL);
  Anar.init(this);
  // Pts.globalRender = new RenderPtsAll();
  Anar.drawAxis(true);
  mySliders = new Sliders();
  createForm();
}
 
 
void createForm(){
  Face sq = new Rect(100,200);
  form.add(sq);
 
  TranslateZ tz = new TranslateZ(20);
 
  for (int i = 0; i<20; i++){
    Face tsq = new Face(sq,tz);
    form.add(tsq);
    if(i%2==0)
      tsq.fill(100);
    sq = tsq;
  }
 
  Translate tb = new Translate(5,2,10);
 
  for (int i = 1; i<20; i += 2)
    form.face(i).apply(tb);
 
 
  for (int i = 1; i<20; i += 3)
    form.face(i).rotateZ(.15f);
 
 
  for (int i = 1; i<5; i++){
    int f = Anar.rndi(form.numOfFaces()-1);
    int p = Anar.rndi(form.face(f).numOfPts());
 
    Pt t = Anar.Pt(form.face(f).pt(p));
    t.translate(1,2,0);
    form.face(f).add(t);
  }
 
 
  Anar.sliders(form);
  Anar.camTarget(form);
}
 
 
void draw(){
  background(255);
  form.draw();
}
 
 
 



screenshots