Package org.jwildfire.create.tina.base

Examples of org.jwildfire.create.tina.base.XForm


    flame.setCamPerspective(0.32);
    layer.getFinalXForms().clear();
    layer.getXForms().clear();
    // 1st xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.25 + Math.random() * 0.5);
      {
        xForm.addVariation(0.25 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("gaussian_blur", true));
      }
      xForm.setColor(0);
      xForm.setColorSymmetry(0);
    }
    // 2nd xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(1 + Math.random() * 50.0);

      XFormTransformService.localTranslate(xForm, 0.3 - 0.6 * Math.random(), 0.3 - 0.6 * Math.random(), false);
      XFormTransformService.rotate(xForm, 90.0 + Math.random() * 180.0, false);
      XFormTransformService.scale(xForm, 1.25 + Math.random() * 1.25, true, true, false);

      {
        VariationFunc varFunc;
        xForm.addVariation(1, VariationFuncList.getVariationFuncInstance("linear3D", true));
        xForm.addVariation(0.01 - Math.random() * 0.02, VariationFuncList.getVariationFuncInstance("epispiral_wf", true));
        xForm.addVariation(0.1 + Math.random() * 0.1, VariationFuncList.getVariationFuncInstance("ztranslate", true));
        xForm.addVariation(0.00001 - Math.random() * 0.00002, VariationFuncList.getVariationFuncInstance("zcone", true));
        {
          String fncLst[] = { "bubble", "log" };
          xForm.addVariation(0.001 + Math.random() * 0.099, VariationFuncList.getVariationFuncInstance(fncLst[(int) (fncLst.length * Math.random())], true));
        }
        {
          String fncLst[] = { "arch", "bipolar", "hyperbolic", "butterfly", "cannabiscurve_wf", "cell", "checks", "circlize", "conic",
              "coth", "cpow", "ex", "falloff2", "fan", "flux", "foci", "heart", "kaleidoscope", "log", "mobius", "ngon", "pdj",
              "oscilloscope", "spherical", "spiral" };
          xForm.addVariation(0.001 + Math.random() * 0.099, VariationFuncList.getVariationFuncInstance(fncLst[(int) (fncLst.length * Math.random())], true));
        }
        {
          String fncLst[] = { "waves2", "waves2_wf", "waves3_wf", "waves4_wf" };

          varFunc = VariationFuncList.getVariationFuncInstance(fncLst[(int) (fncLst.length * Math.random())], true);
          varFunc.setParameter("scalex", 0.5 + Math.random());
          varFunc.setParameter("scaley", 0.5 + Math.random());
          varFunc.setParameter("freqx", 1.0 + Math.random() * 2.0);
          varFunc.setParameter("freqy", 1.0 + Math.random() * 2.0);
          xForm.addVariation(0.05 - Math.random() * 0.1, varFunc);
        }
        {
          String fncLst[] = { "cross", "checks", "conic", "kaleidoscope", "lazysusan", "log" };
          xForm.addVariation(0.001 + Math.random() * 0.015, VariationFuncList.getVariationFuncInstance(fncLst[(int) (fncLst.length * Math.random())], true));
        }
      }
      xForm.setColor(0.33);
      xForm.setColorSymmetry(0);
    }
    // blur xForms
    {
      int blurCount = (int) (Math.random() * 5.0);
      double weight = 0.25 + Math.random() * 0.5;
      for (int i = 0; i < blurCount; i++) {
        XForm xForm = new XForm();
        layer.getXForms().add(xForm);
        xForm.setWeight(weight);
        weight *= 0.75;
        xForm.addVariation(0.25 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("gaussian_blur", true));
        xForm.setColor(0);
        xForm.setColorSymmetry(0);
        XFormTransformService.localTranslate(xForm, 0.3 - 0.6 * Math.random(), 0.3 - 0.6 * Math.random(), true);

      }
    }
    // satellite xForm
    {
      String fncLst[] = { "blade", "blur", "blur3D", "bubble_wf", "cannabiscurve_wf", "circlecrop", "cloverleaf_wf", "conic", "crop", "cross",
          "flower", "flux", "hemisphere", "hyperbolic", "julia3D", "julia3Dz", "lazysusan", "lissajous", "log", "mandelbrot", "mobius", "npolar",
          "pdj", "perspective", "pie", "pie3D", "polar", "polar2", "power", "pre_subflame_wf", "radial_blur", "scry", "separation", "spiral",
          "spirograph", "split", "tangent", "tangent3D", "twintrian", "unpolar", "wedge_sph", "zblur" };
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.1 + Math.random() * 1.4);
      XFormTransformService.localTranslate(xForm, 0.3 - 0.6 * Math.random(), 0.3 - 0.6 * Math.random(), true);
      switch ((int) (Math.random() * 3.0)) {
        case 0:
          xForm.addVariation(0.05 + Math.random() * 0.15, VariationFuncList.getVariationFuncInstance("bubble", true));
          xForm.addVariation(0.01 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance(fncLst[(int) (fncLst.length * Math.random())], true));
          break;
        case 1:
          xForm.addVariation(0.05 + Math.random() * 0.15, VariationFuncList.getVariationFuncInstance("bubble", true));
          break;
        default:
          xForm.addVariation(0.05 + Math.random() * 0.15, VariationFuncList.getVariationFuncInstance(fncLst[(int) (fncLst.length * Math.random())], true));
          break;
      }

      xForm.addVariation(0.05 + Math.random() * 0.15, VariationFuncList.getVariationFuncInstance("bubble", true));
      xForm.setColor(0);
      xForm.setColorSymmetry(0.8 + Math.random() * 0.2);
    }
    // final xForm
    {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
      {
        VariationFunc varFunc;
        xForm.addVariation(0.05 + Math.random() * 0.2, VariationFuncList.getVariationFuncInstance("zscale", true));
        varFunc = VariationFuncList.getVariationFuncInstance("julia3D", true);
        varFunc.setParameter("power", Math.random() < 0.5 ? -3 : -4);
        xForm.addVariation(1, varFunc);
        varFunc = VariationFuncList.getVariationFuncInstance("pre_circlecrop", true);
        varFunc.setParameter("radius", 10000);
        varFunc.setParameter("zero", Math.random() < 0.5 ? 1 : 0);
        xForm.addVariation(1, varFunc);
      }
    }

    return flame;
  }
View Full Code Here


  protected Flame prepareFlame(RandomFlameGeneratorState pState) {
    Flame flame = super.prepareFlame(pState);
    Layer layer = flame.getFirstLayer();
    // modify last xForm
    {
      XForm xForm = layer.getXForms().get(layer.getXForms().size() - 1);
      XFormTransformService.scale(xForm, 0.5 + 5.0 * Math.random(), Math.random() < 0.75, Math.random() < 0.75, false);
      XFormTransformService.rotate(xForm, 180.0 - Math.random() * 360.0, false);
      XFormTransformService.localTranslate(xForm, 4.0 - 8.0 * Math.random(), 4.0 - 8.0 * Math.random(), false);
    }
    return flame;
View Full Code Here

    flame.setPixelsPerUnit(100);
    layer.getFinalXForms().clear();
    layer.getXForms().clear();
    // 1st xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance("julian", true);
      int power = Tools.FTOI(100.0 - Math.random() * 200.0);
      if (power == 0 || power == 1 || power == -1) {
        power = -30;
      }
      varFunc.setParameter("power", power);
      double amounts[] = { 0.25, 0.5, 0.75 };

      xForm.addVariation(amounts[(int) (Math.random() * amounts.length)], varFunc);
      if (Math.random() < 0.5) {
        String fncName = Math.random() > 0.5 ? getNonBlurRandomFunc() : "gaussian_blur";
        xForm.addVariation(0.001 + Math.random() * 0.039, VariationFuncList.getVariationFuncInstance(fncName, true));
      }
      xForm.setColorSymmetry(-1.0);
      xForm.setColor(0.0);
    }
    // 2nd xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(2.0 + Math.random() * 24.0);
      xForm.addVariation(1.0, VariationFuncList.getVariationFuncInstance("disc", true));
      if (Math.random() < 0.125) {
        String fncName = Math.random() > 0.5 ? getNonBlurRandomFunc() : "gaussian_blur";
        xForm.addVariation(0.001 + Math.random() * 0.039, VariationFuncList.getVariationFuncInstance(fncName, true));
      }
      xForm.setColor(0.5 + Math.random() * 0.5);
      xForm.setColorSymmetry(0.6 + Math.random() * 0.33);
      if (Math.random() < 0.33) {
        XFormTransformService.globalTranslate(xForm, -0.0125 + 0.025 * Math.random(), -0.0125 + 0.025 * Math.random(), false);
      }
      else if (Math.random() < 0.75) {
        XFormTransformService.globalTranslate(xForm, -0.125 + 0.25 * Math.random(), -0.125 + 0.25 * Math.random(), false);
      }
      if (Math.random() < 0.15) {
        XFormTransformService.rotate(xForm, 6.0 - Math.random() * 12.0, false);
      }
      else if (Math.random() < 0.3) {
        XFormTransformService.rotate(xForm, -45.0, false);
      }
      else if (Math.random() < 0.75) {
        XFormTransformService.rotate(xForm, 90.0 - Math.random() * 180.0, false);
      }
      xForm.setColorSymmetry(Math.random());
    }
    // final
    if (Math.random() < 0.15) {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
      if (Math.random() < 0.5) {
        String[] fncList = { "auger", "bent", "bent2", "boarders", "bubble", "butterfly", "bwraps7", "cosine",
            "curve", "cylinder", "diamond", "disc", "eclipse", "edisc", "elliptic", "ex", "exp", "exponential",
            "eyefish", "fan", "fan2", "fisheye", "heart_wf", "hemisphere", "horseshoe", "hyperbolic", "julia",
            "julia3D", "julia3Dz", "julian", "juliascope", "linearT", "log", "mobius", "ngon", "oscilloscope",
            "rings", "rings2", "scry", "xtrb", "sec", "sin", "sinh", "sinusoidal", "spherical", "swirl", "tan",
            "tangent", "tanh", "boarders2", "polar" };
        String varName = fncList[(int) (Math.random() * fncList.length)];
        xForm.addVariation(2.0 + Math.random() * 2.0, VariationFuncList.getVariationFuncInstance(varName, true));
      }
    }
    flame.getFirstLayer().randomizeColors();
    return flame;
  }
View Full Code Here

    layer.getFinalXForms().clear();
    layer.getXForms().clear();

    // create transform 1
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      xForm.setColorSymmetry(0.99 - Math.random() * 0.2);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(1);
      xForm.setPostCoeff10(0);
      xForm.setPostCoeff01(0);
      xForm.setPostCoeff11(1);
      xForm.setPostCoeff20(1);
      xForm.setPostCoeff21(-1);

      xForm.addVariation(1, VariationFuncList.getVariationFuncInstance("linear3D", true));
    }
    // create transform 2
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      xForm.setColorSymmetry(0.8 - Math.random() * 0.1);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(1);
      xForm.setPostCoeff10(0);
      xForm.setPostCoeff01(0);
      xForm.setPostCoeff11(1);
      xForm.setPostCoeff20(-1);
      xForm.setPostCoeff21(-1);

      xForm.addVariation(1, VariationFuncList.getVariationFuncInstance("linear3D", true));
    }
    // create transform 3
    {
      XForm xForm = new XForm();
      xForm.setWeight(0.5);
      layer.getXForms().add(xForm);
      xForm.setColor(0.1 + Math.random() * 0.1);
      xForm.setColorSymmetry(0.92);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(1);
      xForm.setPostCoeff10(0);
      xForm.setPostCoeff01(0);
      xForm.setPostCoeff11(1);
      xForm.setPostCoeff20(-1);
      xForm.setPostCoeff21(1);

      xForm.addVariation(1, VariationFuncList.getVariationFuncInstance("linear3D", true));
    }
    // create transform 4
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      xForm.setColorSymmetry(0.9 - Math.random() * 0.2);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(1);
      xForm.setPostCoeff10(0);
      xForm.setPostCoeff01(0);
      xForm.setPostCoeff11(1);
      xForm.setPostCoeff20(1);
      xForm.setPostCoeff21(1);

      xForm.addVariation(1, VariationFuncList.getVariationFuncInstance("linear3D", true));
    }
    // create transform 5
    XForm xForm5;
    {
      XForm xForm = xForm5 = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.05 + Math.random() * 0.2);
      xForm.setColorSymmetry(0.10 + Math.random() * 0.2);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(0.70711);
      xForm.setPostCoeff10(0.70711);
      xForm.setPostCoeff01(-0.70711);
      xForm.setPostCoeff11(0.70711);
      xForm.setPostCoeff20(0);
      xForm.setPostCoeff21(0);

      {
        VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname(), true);
        xForm.addVariation(0.45, varFunc);
      }
    }
    // create optional linked transform 6
    if (Math.random() > 0.75) {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.05 + Math.random() * 0.2);
      xForm.setColorSymmetry(0.10 + Math.random() * 0.2);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(0.70711);
      xForm.setPostCoeff10(0.70711);
      xForm.setPostCoeff01(-0.70711);
      xForm.setPostCoeff11(0.70711);
      xForm.setPostCoeff20(0);
      xForm.setPostCoeff21(0);

      xForm.getModifiedWeights()[5] = 0;

      xForm5.getModifiedWeights()[0] = 0;
      xForm5.getModifiedWeights()[1] = 0;
      xForm5.getModifiedWeights()[2] = 0;
      xForm5.getModifiedWeights()[3] = 0;
      xForm5.getModifiedWeights()[4] = 0;

      {
        VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname(), true);
        xForm.addVariation(0.1 + Math.random() * 0.6, varFunc);
      }
    }
    // create final transform 1
    {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
      xForm.setWeight(0);
      xForm.setColorSymmetry(0);

      xForm.setCoeff00(1); // a
      xForm.setCoeff10(0); // b
      xForm.setCoeff20(0); // e
      xForm.setCoeff01(0); // c
      xForm.setCoeff11(1); // d
      xForm.setCoeff21(0); // f

      xForm.setPostCoeff00(1);
      xForm.setPostCoeff10(0);
      xForm.setPostCoeff01(0);
      xForm.setPostCoeff11(1);
      xForm.setPostCoeff20(0);
      xForm.setPostCoeff21(0);

      XFormTransformService.rotate(xForm, Math.random() * 360.0, true);
      XFormTransformService.localTranslate(xForm, 1.0 - 2.0 * Math.random(), 1.0 - 2.0 * Math.random(), true);

      String variations[] = { "cross", "boarders2", "boarders", "butterfly", "cos", "cosh", "cosine", "cross2", "csc", "cylinder", "cylinder_apo", "dc_ztransl", "elliptic", "eyefish", "fibonacci2", "heart_wf", "hypertile1", "loonie", "mobius", "perspective", "popcorn", "popcorn2_3D", "ripple", "roundspher3D", "scry_3D", "sec", "secant2", "separation", "shredlin", "sin", "spherical", "spiral", "stripes", "unpolar", "waves2", "waves4_wf", "whorl", "xtrb", "rays1", "rays2", "rays3" };
      String varName = Math.random() < 0.33 ? "cross" : Math.random() < 0.33 ? "rays2" : variations[(int) (Math.random() * variations.length)];

      xForm.addVariation(1.57, VariationFuncList.getVariationFuncInstance(varName, true));

    }
    layer.randomizeColors();
    return flame;
  }
View Full Code Here

  }

  private Flame validateDancingFlame(Flame pFlame) {
    for (Layer layer : pFlame.getLayers()) {
      if (layer.getFinalXForms().size() == 0) {
        XForm xForm = new XForm();
        xForm.addVariation(1.0, new Linear3DFunc());
        layer.getFinalXForms().add(xForm);
      }
    }
    return pFlame;
  }
View Full Code Here

    flame.setPixelsPerUnit(200);
    layer.getFinalXForms().clear();
    layer.getXForms().clear();
    // 1st xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(1.0 + Math.random() * 100.0);
      if (Math.random() < 0.75) {
        xForm.addVariation(0.05 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("bubble", true));
      }
      else {
        VariationFunc varFunc = VariationFuncList.getVariationFuncInstance("bubble2", true);
        varFunc.setParameter("z", -0.5 - Math.random() * 2.0);
        xForm.addVariation(0.25 + Math.random() * 0.5, varFunc);
      }
      xForm.addVariation(0.5 + 1.5 * Math.random(), VariationFuncList.getVariationFuncInstance("pre_blur", true));
      final String[] workingFncList = { "fan2", "blade", "blade3D", "blob", "blob3D", "bwraps7", "cell", "cannabiscurve_wf",
          "cloverleaf_wf", "cos", "cot", "coth", "cross", "csch", "diamond", "disc", "edisc", "epispiral_wf", "fan", "fisheye",
          "eyefish", "flux", "heart", "julia", "julian", "juliascope", "log", "parabola", "power", "epispiral",
          "pre_subflame_wf", "rectangles", "rose_wf", "sech", "separation", "split", "truchet", "wedge", "zcone" };
      final String[] fncList = Math.random() < 0.5 ? workingFncList : ExperimentalSimpleRandomFlameGenerator.FNCLST_EXPERIMENTAL;

      VariationFunc varFunc;
      if (Math.random() < 0.5) {
        varFunc = VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname());
      }
      else {
        varFunc = VariationFuncList.getVariationFuncInstance(fncList[(int) (fncList.length * Math.random())], true);
      }

      xForm.addVariation(-0.02 + 0.04 * Math.random(), varFunc);

      double shape = Math.random();
      if (shape < 0.125) {
        xForm.addVariation(0.001 + Math.random() * 0.01, VariationFuncList.getVariationFuncInstance("hexes", true));
      }
      else if (shape < 0.25) {
        xForm.addVariation(0.001 + Math.random() * 0.01, VariationFuncList.getVariationFuncInstance("oscilloscope", true));
      }
      else if (shape < 0.5) {
        xForm.addVariation(0.001 + Math.random() * 0.01, VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname(), true));
      }

      if (Math.random() > 0.33) {
        XFormTransformService.globalTranslate(xForm, -1.0 + 2.0 * Math.random(), -1.0 + 2.0 * Math.random(), true);
      }
      if (Math.random() > 0.33) {
        XFormTransformService.rotate(xForm, -32.0 + Math.random() * 72.0, false);
      }
      if (Math.random() > 0.33) {
        XFormTransformService.scale(xForm, 0.8 + Math.random() * 0.4, true, false);
      }
      xForm.setColor(0.0);
      xForm.setColorSymmetry(0.0);
    }
    // 2nd xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(1.0 + Math.random() * 50.0);
      int fncCount = ExperimentalSimpleRandomFlameGenerator.FNCLST_EXPERIMENTAL.length;
      String fncName = Math.random() > 0.5 ? ExperimentalSimpleRandomFlameGenerator.FNCLST_EXPERIMENTAL[(int) (fncCount * Math.random())] : "eyefish";
      xForm.addVariation(-1.5 + 2 * Math.random() * 3.0, VariationFuncList.getVariationFuncInstance(fncName, true));
      xForm.addVariation(1.0 - 3.5 * Math.random(), VariationFuncList.getVariationFuncInstance("hemisphere", true));
      xForm.setColor(0.0);
      xForm.setColorSymmetry(0.0);
      if (Math.random() > 0.33) {
        XFormTransformService.globalTranslate(xForm, -3.0 + 62.0 * Math.random(), -3.0 + 6.0 * Math.random(), false);
      }
      if (Math.random() > 0.33) {
        XFormTransformService.rotate(xForm, -32.0 + Math.random() * 72.0, false);
      }
      if (Math.random() > 0.33) {
        XFormTransformService.scale(xForm, 0.8 + Math.random() * 0.4, true, false);
      }
    }
    // 3rd xForm   
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(1.0 + Math.random() * 100);
      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(Math.random() > 0.5 ? "julia3Dz" : "julia3D", true);
      int idx = Math.random() > 0.5 ? 2 : (int) (-20 + Math.random() * 40);
      if (idx == 0 || idx == 1) {
        idx = 2;
      }
      varFunc.setParameter("power", (double) idx);
      xForm.addVariation(1.0, varFunc);
      xForm.setColor(0.0);
      xForm.setColorSymmetry(0.0);
      XFormTransformService.globalTranslate(xForm, -1.0 + 2.0 * Math.random(), -3.0 + 6.0 * Math.random(), false);
      XFormTransformService.globalTranslate(xForm, -0.1 + 0.2 * Math.random(), -0.1 + 0.2 * Math.random(), true);
      XFormTransformService.rotate(xForm, -20.0 + Math.random() * 40.0, false);
      XFormTransformService.scale(xForm, 0.8 + Math.random() * 0.4, true, true);
    }
View Full Code Here

  @Override
  public void prepare(FlameTransformationContext pFlameTransformationContext, AbstractRandomGenerator pRandGen, double pCamDOF_10) {
    super.prepare(pFlameTransformationContext, pRandGen, pCamDOF_10);
    s = new XYZPoint();
    d = new XYZPoint();
    xform = new XForm();
    fnc = new NBlurFunc();
    for (String paramName : getParamNames()) {
      fnc.setParameter(paramName, params.get(paramName));
    }
    fnc.init(pFlameTransformationContext, new Layer(), xform, 1.0);
View Full Code Here

  @Override
  public void prepare(FlameTransformationContext pFlameTransformationContext, AbstractRandomGenerator pRandGen, double pCamDOF_10) {
    super.prepare(pFlameTransformationContext, pRandGen, pCamDOF_10);
    s = new XYZPoint();
    d = new XYZPoint();
    xform = new XForm();
    fnc = new XHeartBlurWFFunc();
    for (String paramName : getParamNames()) {
      fnc.setParameter(paramName, params.get(paramName));
    }
    fnc.init(pFlameTransformationContext, new Layer(), xform, 1.0);
View Full Code Here

    layer.getFinalXForms().clear();
    layer.getXForms().clear();
    flame.getFirstLayer().setPalette(pSubFlame.getFirstLayer().getPalette().makeCopy());
    // 1st xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      {
        {
          SubFlameWFFunc var = new SubFlameWFFunc();
          String flameXML = new FlameWriter().getFlameXML(pSubFlame);
          var.setRessource("flame", flameXML.getBytes());
          xForm.addVariation(1, var);
        }
      }
      xForm.setColor(0);
      xForm.setColorSymmetry(-0.22);
    }
    // 2nd xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.25 + Math.random() * 0.5);
      xForm.setCoeff00(0.17254603006834707);
      xForm.setCoeff01(0.6439505508593787);
      xForm.setCoeff10(-0.6439505508593787);
      xForm.setCoeff11(0.17254603006834707);
      xForm.setCoeff20(1.5 + Math.random() * 2.5);
      xForm.setCoeff21(-0.25 - Math.random() * 0.35);
      xForm.addVariation(1, VariationFuncList.getVariationFuncInstance("linear3D", true));
      xForm.setColor(Math.random());
      xForm.setColorSymmetry(-0.62);
    }
    // 3rd xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.25 + Math.random() * 0.5);
      xForm.setCoeff00(0.17254603006834707);
      xForm.setCoeff01(0.6439505508593787);
      xForm.setCoeff10(-0.6439505508593787);
      xForm.setCoeff11(0.17254603006834707);
      xForm.setCoeff20(-3.0);
      xForm.setCoeff21(0.3);
      {
        VariationFunc varFunc;
        varFunc = VariationFuncList.getVariationFuncInstance("curl3D", true);
        varFunc.setParameter("cx", -0.2 + 0.4 * Math.random());
        varFunc.setParameter("cy", 0);
        varFunc.setParameter("cz", 0);
        xForm.addVariation(1, varFunc);
      }
      xForm.setColor(Math.random());
      xForm.setColorSymmetry(0);
    }
    return flame;
  }
View Full Code Here

  @Override
  public void prepare(FlameTransformationContext pFlameTransformationContext, AbstractRandomGenerator pRandGen, double pCamDOF_10) {
    super.prepare(pFlameTransformationContext, pRandGen, pCamDOF_10);
    s = new XYZPoint();
    d = new XYZPoint();
    xform = new XForm();
    fnc = new StarBlurFunc();
    for (String paramName : getParamNames()) {
      fnc.setParameter(paramName, params.get(paramName));
    }
    fnc.init(pFlameTransformationContext, new Layer(), xform, 1.0);
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.base.XForm

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.