Package com.nr.cg

Examples of com.nr.cg.Boxnode


    System.out.println("Testing Boxnode");

    // Create a tree of Boxnodes: 0 -> 1,2 ; 1 -> 3,4 ; 2 -> 5,6
    // With 2 points in each box

    Boxnode boxes2[]=new Boxnode[NBOX];
    Point[] points2=new Point[2*NBOX];

    Ran myran=new Ran(17);
    for (i=0;i<NBOX;i++) {
      Point plo=new Point(myran.doub(),myran.doub());
      Point phi=new Point(myran.doub(),myran.doub());
      d1=phi.x[0]-plo.x[0];
      d2=phi.x[1]-plo.x[1];
      points2[2*i]=new Point(plo.x[0]+0.3*d1,plo.x[1]+0.3*d2);
      points2[2*i+1]=new Point(plo.x[0]+0.6*d1,plo.x[1]+0.6*d2);
      boxes2[i]=new Boxnode(plo,phi,(i-1)/2,2*i+1,2*i+2,2*i,2*i+1);
    }

//    for (i=0;i<NBOX;i++) {
//      System.out.printf(boxes2[i].mom << " ";
//      System.out.printf(boxes2[i].dau1 << " ";
View Full Code Here

TOP

Related Classes of com.nr.cg.Boxnode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.