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:   Test02cPtsProj.pde
   JAVA Download:   Test02cPtsProj.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
 */
 
 
 
Pts  myPtsProj = new Pts();
Pts  myPtsInter = new Pts();
Face f;
 
Pt a,proj,inter;
 
void setup(){
    size(800,400,OPENGL);
  Anar.init(this);
  initForm();
 
  Pts.globalRender = new RenderPtsAll();
}
 
void initForm(){
 
  Param v = new Param(50,0,200).addToSlidersMain();
  Param z = new Param(0);
 
  // create points out of plane z=0
  a = Anar.Pt(z,v,v);
  Pt aa = Anar.Pt(10,20,30);
 
  Pt b = Anar.Pt(-50,-50);
  Pt c = Anar.Pt(50,0);
  Pt d = Anar.Pt(0,50);
 
  f = new Face();
  f.add(b);
  f.add(c);
  f.add(d);    
 
  inter = new PtProj(a,b,c,d);
  proj = new PtProj(a,aa,b,c,d);
 
  myPtsProj.add(a);
  myPtsProj.add(aa);
  myPtsProj.add(proj);
 
  myPtsInter.add(a);
  myPtsInter.add(inter);
 
}
 
void draw(){
  background(153);
  fill(0);
  Anar.text3D(a.toString(),a);
  Anar.text3D(proj.toString(),proj);
  Anar.text3D(inter.toString(),inter);
 
  myPtsProj.draw();
  myPtsInter.draw();
  f.draw();
}
 
 
 



screenshots