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:   Test04zIsForColor.pde
   JAVA Download:   Test04zIsForColor.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.defaultScene = false;
 
  Param p = new Param(80,0,100);
  Anar.sliders(p);
 
  Face a = new Rect(100,200);
 
  Anar.add(a);
 
  for(int i=0; i<10; i++)
    Anar.add(new Face(Anar.faceEnd()).translateX(p));
 
 
  AColor c1 = new AColor(255,0,0,150);
  AColor c2 = new AColor(255,0,0).brightness(255).saturation(150);
 
 
  AColor c3 = new AColor(255,100,0);
  Param alph = new Param(255,0,255);
  c3.w(alph);
  Anar.sliders(alph);
 
  println("-->"+c3);
  c3.saturation(0);
  println("-->"+c3);
 
 
  Anar.face(0).fill(c1);
  Anar.face(1).fill(c2);
  Anar.face(2).fill(c3);
 
 
  AColor[] scheme = AColor.saturation(c1.analogous(6,100),255);
  println("-->"+c1);
  println(scheme.length);
 
  for(int i=0;i<Anar.numOfFaces()&&i<scheme.length; i++ )
    Anar.face(i+4).fill(scheme[i]);
 
 
  /////////////////////////////////////////////////////////////////////////
 
  AColor[] scheme2 = AColor.saturation(c1.analogous(width/10,100),250);
 
  Face b = new Rect(10,20).translateY(300);
  Anar.add(b);
 
  for(int i=0; i<scheme2.length; i++)
    Anar.add(new Face(Anar.faceEnd()).translateX(10).fill(scheme2[i]));    
 
}
 
 
void draw(){
  background(200);
  Anar.draw();
}
 
 
 



screenshots