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:   Test03eFoldingParametrized.pde
   JAVA Download:   Test03eFoldingParametrized.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
 */
 
void setup(){
    size(800,400,OPENGL);
 
  Anar.init(this);
  Anar.drawAxis(true);
 
  initForm();
}
 
 
void initForm(){
 
  Anar.sliders.add(new Param(PI,PI,2*PI));
 
  Transform tx = new TranslateX(10);
  Transform ty = new TranslateY(10);
 
  Anar.sliders.add(tx,ty);
 
  Pt a = Anar.Pt(0,0,0);
  Pt b = Anar.Pt(a,tx);
  Pt c = Anar.Pt(b,tx).apply(ty);
  Pt d = Anar.Pt(a,tx).apply(ty);
  Pt e = Anar.Pt(a,ty);
 
  Face shape = new Face(a,b,c,d,e);
 
  shape.rotateY(Anar.sliders.get(0));
  shape.fill(255,0,0);
 
  Anar.add(shape);
 
  Face f = shape;
 
  for (int i = 0; i<25; i++)
    Anar.add(f = new Face(Anar.face(0),new Transform(f.pt(3),f.pt(1),f.pt(2)).postTransform()).fill(255,255,0));
 
  for (int i = 0; i<15; i++)
    Anar.add(new Obj(Anar.objEnd()).apply(tx).apply(tx).apply(ty));
 
 
}
 
 
void draw(){
  background(155);
 
  Anar.draw();
  if(frameCount%100==0)
  Anar.camTarget(Anar.main);
}
 
 
 



screenshots