Package ca.eandb.jmist.framework.function

Examples of ca.eandb.jmist.framework.function.ConstantFunction1


  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.ColorModel#getGray(double)
   */
  @Override
  public Spectrum getGray(double value) {
    return new SingleXYZContinuousSpectrum(new ConstantFunction1(value));
  }
View Full Code Here


    this.riBelow = riBelow;
    this.riAbove = riAbove;
  }

  public TrowbridgeReitzSurfaceScatterer(double oblateness, double riBelow, double riAbove) {
    this(oblateness, new ConstantFunction1(riBelow), new ConstantFunction1(riAbove));
  }
View Full Code Here

//    Function1 iorMesophyll = new AXpBFunction1(
//        (1.0 - scattererFractionInMesophyll),
//        1.5608 * scattererFractionInMesophyll,
//        IOR_WATER);

    Function1 iorMesophyll = new ConstantFunction1(1.415);

    Function1 iorAntidermalWall = new AXpBFunction1(
        (1.0 - scattererFractionInAntidermalWall),
        1.535 * scattererFractionInAntidermalWall,
        IOR_WATER);

    double concDryMatter = dryBulkDensity / (1.0 - airVolumeFraction);

    double concProtein = concDryMatter * proteinFraction;
    double concCellulose = concDryMatter * celluloseFraction;
    double concLignin = concDryMatter * ligninFraction;

    double absProtein = concProtein * SAC_PROTEIN;
    double absCellulose = concCellulose * SAC_CELLULOSE_LIGNIN;
    double absLignin = concLignin * SAC_CELLULOSE_LIGNIN;

    Function1 mesophyllAbsorptionCoefficient = new SumFunction1()
      .addChild(new ScaledFunction1(
          concChlorophyllAInMesophyll + concChlorophyllBInMesophyll,
          SAC_CHLOROPHYLL_AB))
      .addChild(new ScaledFunction1(
          concCarotenoidsInMesophyll,
          SAC_CAROTENOIDS))
      .addChild(new ConstantFunction1(absProtein + absCellulose + absLignin))
      .addChild(SAC_WATER);

//    try {
//      OutputStream file = new FileOutputStream("/Users/brad/mesosac.csv");
//      PrintStream out = new PrintStream(new CompositeOutputStream()
//          .addChild(System.out)
//          .addChild(file));
//      for (int i = 400; i <= 700; i += 5) {
//        out.println(mesophyllAbsorptionCoefficient.evaluate(1e-9 * (double) i));
//      }
//      out.flush();
//      file.close();
//    } catch (IOException e) {
//      e.printStackTrace();
//    }

    double mesophyllFraction = bifacial ? 0.5 : 0.8;
    mesophyllThickness = mesophyllFraction * wholeLeafThickness;

    double lambda = 550e-9;
    System.out.printf("mesophyllAbsorptionCoefficient=%f", mesophyllAbsorptionCoefficient.evaluate(lambda));
    System.out.println();
    System.out.printf("mesophyllThickness=%f", mesophyllThickness);
    System.out.println();
    System.out.printf("mesophyllOpticalDepth=%f", mesophyllAbsorptionCoefficient.evaluate(lambda) * mesophyllThickness);
    System.out.println();
    System.out.printf("nCuticle=%f", IOR_CUTICLE.evaluate(lambda));
    System.out.println();
    System.out.printf("nWater=%f", IOR_WATER.evaluate(lambda));
    System.out.println();
    System.out.printf("sacWater=%f", SAC_WATER.evaluate(lambda));
    System.out.println();
    System.out.printf("nWall=%f", iorAntidermalWall.evaluate(lambda));
    System.out.println();
    System.out.printf("nMesophyll=%f", iorMesophyll.evaluate(lambda));
    System.out.println();
    System.out.printf("dryBulkDensity=%f", dryBulkDensity);
    System.out.println();

    if (bifacial) {
View Full Code Here

   * Creates a new <code>LambertianSurfaceScatterer</code>.
   * @param reflectance The reflectance of the surface.
   * @param transmittance The transmittance of the surface.
   */
  public LambertianSurfaceScatterer(double reflectance, double transmittance) {
    this(new ConstantFunction1(reflectance), new ConstantFunction1(transmittance));
  }
View Full Code Here

  /**
   * Creates a new <code>LambertianSurfaceScatterer</code>.
   * @param reflectance The reflectance of the surface.
   */
  public LambertianSurfaceScatterer(double reflectance) {
    this(new ConstantFunction1(reflectance));
  }
View Full Code Here

   * Creates a new <code>FresnelSurfaceScatterer</code>.
   * @param riBelow The refractive index of the medium below the interface.
   * @param riAbove The refractive index of the medium above the interface.
   */
  public FresnelSurfaceScatterer(double riBelow, double riAbove) {
    this(new ConstantFunction1(riBelow), new ConstantFunction1(riAbove));
  }
View Full Code Here

   *     bottom side to the top side of the interface.
   * @param n22 The perturbation exponent used for a ray reflected from the
   *     bottom side of the interface.
   */
  public ABMInterfaceSurfaceScatterer(double riBelow, double riAbove, double n11, double n12, double n21, double n22) {
    this(new ConstantFunction1(riBelow), new ConstantFunction1(riAbove), n11, n12, n21, n22);
  }
View Full Code Here

          concChlorophyllAInMesophyll + concChlorophyllBInMesophyll,
          SAC_CHLOROPHYLL_AB))
      .addChild(new ScaledFunction1(
          concCarotenoidsInMesophyll,
          SAC_CAROTENOIDS))
      .addChild(new ConstantFunction1(absProtein + absCellulose + absLignin))
      .addChild(SAC_WATER);

//    try {
//      OutputStream file = new FileOutputStream("/Users/brad/mesosac.csv");
//      PrintStream out = new PrintStream(new CompositeOutputStream()
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.framework.function.ConstantFunction1

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.