Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Complex


    double[] n2d = n2.toArray();
    double[] k2d = k2 != null ? k2.toArray() : null;

    for (int i = 0; i < n1d.length; i++) {
      n1d[i] = Optics.reflectance(in,
          new Complex(n1d[i], k1d != null ? k1d[i] : 0.0),
          new Complex(n2d[i], k2d != null ? k2d[i] : 0.0),
          normal);
    }

    return colorModel.fromArray(n1d, lambda);
  }
View Full Code Here


//        } else { // !disperse
          double    n1avg  = ColorUtil.getMeanChannelValue(n1);
          double    k1avg  = ColorUtil.getMeanChannelValue(k1);
          double    n2avg  = ColorUtil.getMeanChannelValue(n2);
          double    k2avg  = ColorUtil.getMeanChannelValue(k2);
          Complex    eta1  = new Complex(n1avg, k1avg);
          Complex    eta2  = new Complex(n2avg, k2avg);
          Vector3    out    = Optics.refract(v, eta1, eta2, normal);
          boolean    toSide  = x.getNormal().dot(out) >= 0.0;

          if (fromSide != toSide) {
            return ScatteredRay.transmitSpecular(new Ray3(p, out), T.divide(1 - r), 1 - r);
View Full Code Here

//      }
    } else { // !disperse
      double    n1avg  = ColorUtil.getMeanChannelValue(n1);
      double    k1avg  = ColorUtil.getMeanChannelValue(k1);
      double    n2avg  = ColorUtil.getMeanChannelValue(n2);
      Complex    eta1  = new Complex(n1avg, k1avg);
      Complex    eta2  = new Complex(n2avg);
      Vector3    out    = Optics.refract(v, eta1, eta2, normal);
      boolean    toSide  = x.getNormal().dot(out) >= 0.0;

      if (fromSide != toSide) {
        return ScatteredRay.transmitSpecular(new Ray3(p, out), T.divide(1 - r), 1 - r);
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.math.Complex

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.