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.
 

source


   PDE Download:   Test05fPergo.pde
   JAVA Download:   Test05fPergo.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
 */
 
// This quick examples is an implementation of an Architectural System
// done by my brilliant students: http://organicitta.blogspot.com/
void setup(){
    size(800,400,OPENGL);
  Anar.init(this);
  Anar.drawAxis();
  createModule();
}
 
void createModule(){
 
  Param length = new Param(98.235f).addToSlidersMain();
  Param len2 = length.divide(2).inv();
 
  Param incrust = new Param(0.85f).addToSlidersMain();
  Param invrust = incrust.inv();
 
  Group tmp = new Group();
 
  Pt origin = Anar.Pt(0,0,0);
  Obj linesA = new Obj().add(new Pts(origin,origin.copy().translateX(length) ).translateX(len2) ).translateY(len2);
 
  for (int i = 0; i<20; i++)
    linesA.add(linesA.lineMod( -1).copy().translateY(5));
 
  tmp.add(linesA);
  tmp.add(tmp.objEnd().copy().rotateZ(-2*PI/3));
  tmp.add(tmp.objEnd().copy().rotateZ(-2*PI/3));
 
  Anar.add(tmp.obj(0).extrude(10/3f).translateZ(10/6f));
  Anar.add(tmp.obj(1).extrude(10).translateZ(incrust));
  Anar.add(tmp.obj(2).extrude(-10).translateZ(invrust));
}
 
 
void draw(){
  background(255);
  Anar.draw();
}
 
 
void keyPressed(){
 
}
 
 
 



screenshots




 

Leave a Reply

 

You must be logged in to post a comment.

 
 

anar+