@@ -0,0 +1,1966 @@
+/****************************************************************************%0ACopyright (c) 2013, Colorado School of Mines and others. All rights reserved.%0AThis program and accompanying materials are made available under the terms of%0Athe Common Public License - v1.0, which accompanies this distribution, and is%0Aavailable at http://www.eclipse.org/legal/cpl-v10.html%0A****************************************************************************/%0Apackage edu.mines.jtk.sgl;%0A%0Aimport java.awt.*;%0A%0Aimport edu.mines.jtk.dsp.*;%0Aimport static edu.mines.jtk.util.ArrayMath.*;%0A%0A/**%0A * Tests %7B@link edu.mines.jtk.sgl.TensorsPanel%7D.%0A * @author Dave Hale%0A * @version 2013.11.20%0A */%0Apublic class TensorsPanelTest %7B%0A%0A  public static void main(String%5B%5D args) %7B%0A    test0();%0A  %7D%0A%0A  public static void test0() %7B%0A    int n1 = 1;%0A    int n2 = 111;%0A    int n3 = 111;%0A    EigenTensors3 et = new EigenTensors3(n1,n2,n3,false);%0A    float eu = 1.0f, ev = 1.0f, ew = 0.01f;%0A    float u1 = 1.0f, u2 = 0.0f, u3 = 0.0f;%0A    float w1 = 0.0f, w2 = 0.0f, w3 = 1.0f;%0A    for (int i3=0; i3%3Cn3; ++i3) %7B%0A      float a = i3*FLT_PI/2.0f/(n3-1);%0A      w2 = sin(a);%0A      w3 = cos(a);%0A      for (int i2=0; i2%3Cn2; ++i2) %7B%0A        for (int i1=0; i1%3Cn1; ++i1) %7B%0A          et.setEigenvalues(i1,i2,i3,eu,ev,ew);%0A          et.setEigenvectorU(i1,i2,i3,u1,u2,u3);%0A          et.setEigenvectorW(i1,i2,i3,w1,w2,w3);%0A        %7D%0A      %7D%0A    %7D%0A    show(et);%0A  %7D%0A%0A  ///////////////////////////////////////////////////////////////////////////%0A  // private%0A%0A  private static void show(EigenTensors3 et) %7B%0A    int n1 = et.getN1();%0A    int n2 = et.getN2();%0A    int n3 = et.getN3();%0A    TensorsPanel tp = new TensorsPanel(et);%0A    AxisAlignedQuad aaq = new AxisAlignedQuad(Axis.Z,%0A      new Point3(   0,   0,n1/2),%0A      new Point3(n3-1,n2-1,n1/2));%0A    aaq.getFrame().addChild(tp);%0A    World world = new World();%0A    world.addChild(aaq);%0A    SimpleFrame sf = new SimpleFrame(world);%0A    sf.getOrbitView().setScale(2.0);%0A  %7D%0A%7D%0A

Test tensor panel.