Package org.jwildfire.base.mathparser

Examples of org.jwildfire.base.mathparser.JEPWrapper.evaluate()


        double grayValue = 0.0;
        for (int l = 0; l < octaves; l++) {
          double noiseValue = noise(x * freq, y * freq, 0.0);
          if (transform) {
            parser.setVarValue("x", noiseValue);
            noiseValue = (Double) parser.evaluate(node);
          }
          grayValue += alphaInt * noiseValue;
          freq *= frequencyMultiplier;
          alphaInt *= persistence;
        }
View Full Code Here


            parser.setVarValue("fgB", (double) fgPixel.b / 255.0);

            // TODO Genlock: z. B. Testen, ob Intensit�t 0 oder gr��er 0
            // genlockFormula, genlockOperator (gleich, gr��er), genlockRefValue

            bgPixel.r = Tools.roundColor((Double) parser.evaluate(redNode) * 255.0);
            bgPixel.g = Tools.roundColor((Double) parser.evaluate(greenNode) * 255.0);
            bgPixel.b = Tools.roundColor((Double) parser.evaluate(blueNode) * 255.0);
            bgImg.setRGB(left, top, bgPixel);
          }
        }
View Full Code Here

            // TODO Genlock: z. B. Testen, ob Intensit�t 0 oder gr��er 0
            // genlockFormula, genlockOperator (gleich, gr��er), genlockRefValue

            bgPixel.r = Tools.roundColor((Double) parser.evaluate(redNode) * 255.0);
            bgPixel.g = Tools.roundColor((Double) parser.evaluate(greenNode) * 255.0);
            bgPixel.b = Tools.roundColor((Double) parser.evaluate(blueNode) * 255.0);
            bgImg.setRGB(left, top, bgPixel);
          }
        }
      }
View Full Code Here

            // TODO Genlock: z. B. Testen, ob Intensit�t 0 oder gr��er 0
            // genlockFormula, genlockOperator (gleich, gr��er), genlockRefValue

            bgPixel.r = Tools.roundColor((Double) parser.evaluate(redNode) * 255.0);
            bgPixel.g = Tools.roundColor((Double) parser.evaluate(greenNode) * 255.0);
            bgPixel.b = Tools.roundColor((Double) parser.evaluate(blueNode) * 255.0);
            bgImg.setRGB(left, top, bgPixel);
          }
        }
      }
    }
View Full Code Here

    for (int i = 0; i < xCount; i++) {
      x[i] = xc;
      parser.setVarValue("x", xc);
      sb.append("  f(" + Tools.doubleToString(x[i]) + ")  \t");
      for (int j = 0; j < fCount; j++) {
        y[j][i] = (Double) parser.evaluate(fNode[j]);
        sb.append(Tools.doubleToString(y[j][i]) + " \t");
      }
      sb.append("\n");
      xc += xstep;
    }
View Full Code Here

    if (this.axis == Axis.X) {
      if (!this.damp) {
        for (int i = 0; i < pCount; i++) {
          double xx = ((x[i] - objXMin) * dx) / objXSize + xMin;
          parser.setVarValue("x", xx);
          double amp = (Double) parser.evaluate(node);
          z[i] -= amp;
        }
      }
      else {
        for (int i = 0; i < pCount; i++) {
View Full Code Here

      }
      else {
        for (int i = 0; i < pCount; i++) {
          double xx = ((x[i] - objXMin) * dx) / objXSize + xMin;
          parser.setVarValue("x", xx);
          double amp = (Double) parser.evaluate(node);
          double dxx = ((x[i] - objXMin) * dx) / objXSize + xMin - originX;
          double drr = Math.abs(dxx);
          double dmp = drr * damping;
          amp *= Math.exp(dmp);
          z[i] -= amp;
View Full Code Here

    else if (this.axis == Axis.Y) {
      if (!this.damp) {
        for (int i = 0; i < pCount; i++) {
          double yy = ((y[i] - objYMin) * dx) / objYSize + xMin;
          parser.setVarValue("x", yy);
          double amp = (Double) parser.evaluate(node);
          z[i] -= amp;
        }
      }
      else {
        for (int i = 0; i < pCount; i++) {
View Full Code Here

      }
      else {
        for (int i = 0; i < pCount; i++) {
          double yy = ((y[i] - objYMin) * dx) / objYSize + xMin;
          parser.setVarValue("x", yy);
          double amp = (Double) parser.evaluate(node);
          double dyy = ((y[i] - objYMin) * dx) / objYSize + xMin - originY;
          double drr = Math.abs(dyy);
          double dmp = drr * damping;
          amp *= Math.exp(dmp);
          z[i] -= amp;
View Full Code Here

        for (int i = 0; i < pCount; i++) {
          double xx = ((x[i] - objXMin) * dx) / objXSize + xMin;
          double yy = ((y[i] - objYMin) * dx) / objYSize + xMin;
          double rr = Math.sqrt(xx * xx + yy * yy);
          parser.setVarValue("x", rr);
          double amp = (Double) parser.evaluate(node);
          z[i] -= amp;
        }
      }
      else {
        for (int i = 0; i < pCount; i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.