Package org.jwildfire.create.tina.variation

Examples of org.jwildfire.create.tina.variation.VariationFunc


    // 1st XForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(wavesWeight);
      VariationFunc w2 = Math.random() > 0.89 ? createWaves2Variation(scaleX, scaleY, freqX, freqY) : createWaves2BVariation(scaleX, scaleY, freqX, freqY);
      xForm.addVariation(1 + Math.random() * 0.001, w2);

      String varLst[] = { "blur", "cos", "exp", "exponential", "lazysusan", "ngon", "sech", "sinh", "epispiral_wf", "tanh", "twintrian", "epispiral" };
      String varName = Math.random() > 0.25 ? varLst[(int) (Math.random() * varLst.length)] : VariationFuncList.getRandomVariationname();
      xForm.addVariation(blurAmount, VariationFuncList.getVariationFuncInstance(varName, true));
View Full Code Here


    }
    return flame;
  }

  public static VariationFunc createWaves2BVariation(double scaleX, double scaleY, double freqX, double freqY) {
    VariationFunc w2;
    w2 = VariationFuncList.getVariationFuncInstance("waves2b", true);
    double pwx = 3 * Math.random();
    if (pwx < 1) {
      pwx = 1; // typical setting
    }
    else if (pwx < 2) {
      pwx = ((pwx - 1.5) > 0 ? -1.0 : +1.0) * (0.5 + 2.0 * Math.random()); // advanced
    }
    else {
      pwx = ((pwx - 2.5) > 0 ? -1.0 : +1.0) * 1e-6 * (0.9 - Math.random() * 0.2); // geeky functions
    }
    double pwy = 3 * Math.random();
    if (pwy < 1.5) {
      pwy = 1; // typical setting
    }
    else if (pwy < 2.25) {
      pwy = ((pwy - 1.5) > 0 ? -1.0 : +1.0) * (0.5 + 2.0 * Math.random()); // advanced
    }
    else {
      pwy = ((pwy - 2.5) > 0 ? -1.0 : +1.0) * 1e-6; // geeky functions
    }
    w2.setParameter("pwx", pwx);
    w2.setParameter("pwy", pwy);
    double scaleinfx = Math.random() < 0.5 ? scaleX : 0.5 - Math.random();
    double scaleinfy = Math.random() < 0.5 ? scaleY : 0.5 - Math.random();
    w2.setParameter("scaleinfx", scaleinfx);
    w2.setParameter("scaleinfy", scaleinfy);
    if (Math.random() > 0.75) {
      double unity = Math.random() * 10;
      unity = unity < 5.0 ? unity - 1.0 : unity + 5.0;
      w2.setParameter("unity", unity);
    }
    if (Math.random() < 0.33) {
      double jacok = 0.375 - Math.random() * 0.75;
      w2.setParameter("jacok", jacok);
    }
    w2.setParameter("freqx", freqX);
    w2.setParameter("scalex", scaleX);
    w2.setParameter("freqy", freqY);
    w2.setParameter("scaley", scaleY);
    return w2;
  }
View Full Code Here

    w2.setParameter("scaley", scaleY);
    return w2;
  }

  public static VariationFunc createWaves2Variation(double scaleX, double scaleY, double freqX, double freqY) {
    VariationFunc w2;
    w2 = VariationFuncList.getVariationFuncInstance("waves2", true);
    w2.setParameter("freqx", freqX);
    w2.setParameter("scalex", scaleX);
    w2.setParameter("freqy", freqY);
    w2.setParameter("scaley", scaleY);
    return w2;
  }
View Full Code Here

      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5 + Math.random() * 0.8);
      if (Math.random() < 0.05) {
        xForm.addVariation(0.01 + Math.random() * 0.4, VariationFuncList.getVariationFuncInstance("bubble", true));
        VariationFunc checks = VariationFuncList.getVariationFuncInstance("checks", true);
        checks.setParameter("size", 5.0);
        checks.setParameter("x", 3.0);
        checks.setParameter("y", 3.0);
        xForm.addVariation(0.01 + Math.random() * 0.04, checks);
      }
      else {
        xForm.addVariation(0.1 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("bubble", true));
      }
View Full Code Here

      layer.getXForms().add(xForm);
      xForm.setWeight(1.0);
      xForm.setColor(0.0);
      xForm.setColorSymmetry(-1.0);

      VariationFunc synth = VariationFuncList.getVariationFuncInstance("synth");
      xForm.addVariation(1.0, synth);
      synth.setParameter("mode", (int) (20 * Math.random())); //3;
      synth.setParameter("power", -0.2);

      int numWaves = (int) (Math.random() * 3.5 + 2);
      // Starting circle . . .
      synth.setParameter("a", 0.8 + (Math.random() * 0.4));
      // Wave #1
      synth.setParameter("b", Math.random() * 2);
      synth.setParameter("b_type", (int) (Math.random() * 7));
      synth.setParameter("b_frq", (int) (Math.random() * 7 + 1));
      synth.setParameter("b_phs", Math.random() * M_PI);
      synth.setParameter("b_layer", (int) (Math.random() * 4));
      // Skew effect?
      if (Math.random() < 0.2) {
        synth.setParameter("b_skew", Math.random() * 2 - 1);
      }
      // Exceptionally high frequency?
      if (Math.random() < 0.1) {
        synth.setParameter("b_frq", (int) (Math.random() * 20 + 7));
      }
      // Usually higher frequencies affect the amplitude
      if (Math.random() < 0.8) {
        synth.setParameter("b", (Double) synth.getParameter("b") / (1 + 0.3 * (Double) synth.getParameter("b_frq")));
      }

      // Wave #2
      synth.setParameter("c", Math.random());
      synth.setParameter("c_type", (int) (Math.random() * 7));
      synth.setParameter("c_frq", (int) (Math.random() * 7 + 1));
      synth.setParameter("c_phs", Math.random() * M_PI);
      synth.setParameter("c_layer", (int) (Math.random() * 4));
      // Skew effect?
      if (Math.random() < 0.2) {
        synth.setParameter("c_skew", Math.random() * 2 - 1);
      }
      // Exceptionally high frequency?
      if (Math.random() < 0.1) {
        synth.setParameter("c_frq", (int) (Math.random() * 20 + 7));
      }
      // Usually higher frequencies affect the amplitude
      if (Math.random() < 0.8) {
        synth.setParameter("c", (Double) synth.getParameter("c") / (1 + 0.3 * (Double) synth.getParameter("c_frq")));
      }

      // Wave #3
      if (numWaves >= 3) {
        synth.setParameter("d", Math.random());
        synth.setParameter("d_type", (int) (Math.random() * 7));
        synth.setParameter("d_frq", (int) (Math.random() * 7 + 1));
        synth.setParameter("d_phs", Math.random() * M_PI);
        synth.setParameter("d_layer", (int) (Math.random() * 4));
        // Skew effect?
        if (Math.random() < 0.2) {
          synth.setParameter("d_skew", Math.random() * 2 - 1);
        }
        // Exceptionally high frequency?
        if (Math.random() < 0.1) {
          synth.setParameter("d_frq", (int) (Math.random() * 20 + 7));
        }
        // Usually higher frequencies affect the amplitude
        if (Math.random() < 0.8) {
          synth.setParameter("d", (Double) synth.getParameter("d") / (1 + 0.3 * (Double) synth.getParameter("d_frq")));
        }
      }

      // Wave #4
      if (numWaves >= 4) {
        synth.setParameter("e", Math.random());
        synth.setParameter("e_type", (int) (Math.random() * 7));
        synth.setParameter("e_frq", (int) (Math.random() * 7 + 1));
        synth.setParameter("e_phs", Math.random() * M_PI);
        synth.setParameter("e_layer", (int) (Math.random() * 4));
        // Skew effect?
        if (Math.random() < 0.2) {
          synth.setParameter("e_skew", Math.random() * 2 - 1);
        }
        // Exceptionally high frequency?
        if (Math.random() < 0.1) {
          synth.setParameter("e_frq", (int) (Math.random() * 20 + 7));
        }
        // Usually higher frequencies affect the amplitude
        if (Math.random() < 0.8) {
          synth.setParameter("e", (Double) synth.getParameter("e") / (1 + 0.3 * (Double) synth.getParameter("e_frq")));
        }
      }

      // Wave #5
      if (numWaves >= 5) {
        synth.setParameter("f", Math.random());
        synth.setParameter("f_type", (int) (Math.random() * 7));
        synth.setParameter("f_frq", (int) (Math.random() * 7 + 1));
        synth.setParameter("f_phs", Math.random() * M_PI);
        synth.setParameter("f_layer", (int) (Math.random() * 4));
        // Skew effect?
        if (Math.random() < 0.2) {
          synth.setParameter("f_skew", Math.random() * 2 - 1);
        }
        // Exceptionally high frequency?
        if (Math.random() < 0.1) {
          synth.setParameter("f_frq", (int) (Math.random() * 20 + 7));
        }
        // Usually higher frequencies affect the amplitude
        if (Math.random() < 0.8) {
          synth.setParameter("f", (Double) synth.getParameter("f") / (1 + 0.3 * (Double) synth.getParameter("f_frq")));
        }
      }
    }

    // Second "inner" transform is smaller with a little noise
    // added to remove annoying lines at the centre
    {
      XForm xForm = xForm1.makeCopy();
      layer.getXForms().add(xForm);
      xForm.setWeight(1.0);
      xForm.setColor(centre_color);
      xForm.setColorSymmetry(centre_symmetry);

      VariationFunc synth = xForm.getVariation(0).getFunc();
      xForm.getVariation(0).setAmount(centre_synth);
      synth.setParameter("power", centre_power);
      synth.setParameter("mode", centre_mode);
      synth.setParameter("smooth", centre_smooth);

      VariationFunc noise = VariationFuncList.getVariationFuncInstance("noise");
      xForm.addVariation(centre_noise, noise);

    }

    if (Math.random() < 0.55) {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(5 * Math.random() + 0.125);
      xForm.setColor(centre_color + 0.2 * Math.random());
      xForm.setColorSymmetry(centre_symmetry - 0.4 * Math.random());

      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname());
      xForm.addVariation(0.25 + Math.random() * 1.5, varFunc);

      xForm.getModifiedWeights()[1] = 0.0;
    }

View Full Code Here

      pRow.getNonlinearVarREd().setText(null);
      pRow.getNonlinearParamsCmb().setSelectedIndex(-1);
      pRow.getNonlinearParamsREd().setText(null);
    }
    else {
      VariationFunc varFunc = pVar.getFunc();
      pRow.getNonlinearVarCmb().setSelectedItem(varFunc.getName());
      pRow.getNonlinearVarREd().setText(Tools.doubleToString(pVar.getAmount()));
      pRow.getNonlinearParamsCmb().removeAllItems();
      // ressources
      int resCount = 0;
      String[] resNames = varFunc.getRessourceNames();
      if (resNames != null) {
        for (String name : resNames) {
          pRow.getNonlinearParamsCmb().addItem(name);
          resCount++;
        }
      }
      // params     
      String[] paramNames = varFunc.getParameterNames();
      if (paramNames != null) {
        for (String name : paramNames) {
          pRow.getNonlinearParamsCmb().addItem(name);
        }
      }
      // preselection
      if (resCount > 0) {
        pRow.getNonlinearParamsCmb().setSelectedIndex(0);
        enableNonlinearControls(pRow, true);
      }
      else if (varFunc.getParameterNames().length > 0) {
        pRow.getNonlinearParamsCmb().setSelectedIndex(0);
        Object val = varFunc.getParameterValues()[0];
        if (val instanceof Double) {
          pRow.getNonlinearParamsREd().setText(Tools.doubleToString((Double) val));
        }
        else {
          pRow.getNonlinearParamsREd().setText(val.toString());
View Full Code Here

        Variation crackle = null;
        for (XForm xform : layer.getXForms()) {
          for (int i = xform.getVariationCount() - 1; i >= 0; i--) {
            Variation var = xform.getVariation(i);
            if (var.getFunc().getName().equals(CrackleFunc.VAR_NAME)) {
              VariationFunc varFunc = var.getFunc();
              double scale = (Double) varFunc.getParameter(CrackleFunc.PARAM_SCALE);
              if (MathLib.fabs(scale) < MathLib.EPSILON) {
                crackle = var;
                xform.setColor(Math.random());
                break;
              }
View Full Code Here

      xForm.setWeight(3.0 + Math.random() * 10.0);
      if (Math.random() < 0.33) {
        xForm.addVariation(1.0, VariationFuncList.getVariationFuncInstance("linear3D", true));
      }
      else {
        VariationFunc f = VariationFuncList.getVariationFuncInstance("linearT3D", true);
        double x = 2.0 * Math.random() - 0.5;
        f.setParameter("powX", x);
        f.setParameter("powY", x);
        f.setParameter("powZ", 2.0 * Math.random() - 0.5);
        xForm.addVariation(1.0, f);
      }
      xForm.addVariation(0.1 + Math.random() * 0.3, VariationFuncList.getVariationFuncInstance("spherical", true));
      xForm.addVariation(0.2 + Math.random() * 0.9, VariationFuncList.getVariationFuncInstance("zcone", true));
      xForm.addVariation(0.01 + 0.045 * Math.random(), VariationFuncList.getVariationFuncInstance("cross", true));
      if (Math.random() < 0.33) {
        VariationFunc ef = VariationFuncList.getVariationFuncInstance("epispiral_wf", true);
        ef.setParameter("waves", 3 + (int) (Math.random() * 10.0));
        xForm.addVariation(0.02 + 0.29 * Math.random(), ef);
        if (Math.random() < 0.33) {
          VariationFunc ef2 = VariationFuncList.getVariationFuncInstance("epispiral", true);
          ef2.setParameter("thickness", 0.05 + Math.random() * 0.15);
          ef2.setParameter("n", 3.0 + Math.random() * 10.0);
          xForm.addVariation(0.01 + 0.14 * Math.random(), ef2);
        }
      }
      xForm.setColor(Math.random());
      xForm.setColorSymmetry(Math.random());
      XFormTransformService.scale(xForm, 1.0 + (0.1 - Math.random() * 0.2), true, true, false);
      XFormTransformService.rotate(xForm, 45.0 - Math.random() * 90.0, false);
      XFormTransformService.localTranslate(xForm, 0.01 - 0.02 * Math.random(), 0.01 - 0.02 * Math.random(), false);
    }
    // 3rd xForm
    boolean advStructure = Math.random() > 0.25;
    if (advStructure) {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.3 + Math.random() * 0.3);
      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance("blob3D", true);
      varFunc.setParameter("low", 0.1);
      varFunc.setParameter("high", 0.3);
      varFunc.setParameter("waves", 9.0);
      xForm.addVariation(0.05, varFunc);
      xForm.setColor(0.0);
      xForm.setColorSymmetry(1.0);
      // 4th xForm
    }
    if (advStructure && Math.random() > 0.25) {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.1 + Math.random() * 0.3);
      xForm.addVariation(0.5, VariationFuncList.getVariationFuncInstance("blur3D", true));
      xForm.addVariation(15.0, VariationFuncList.getVariationFuncInstance("ztranslate", true));
      xForm.setColor(0.0);
      xForm.setColorSymmetry(1.0);
    }
    // final xForm
    {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance("julia3D", true);
      double power = -2.0;
      if (Math.random() < 0.25) {
        power -= Math.random() * 4.0;
      }
      varFunc.setParameter("power", power);
      xForm.addVariation(2.0 + (1.0 - 2.0 * Math.random()), varFunc);
      xForm.setColor(0.0);
      xForm.setColorSymmetry(0.0);
    }
    return flame;
View Full Code Here

    layer.getFinalXForms().clear();
    layer.getXForms().clear();
    flame.setPreserveZ(Math.random() < 0.5);

    boolean invert = Math.random() > 0.5;
    VariationFunc varFunc;

    // 1st xForm
    XForm xForm1;
    {
      XForm xForm = xForm1 = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(1.0 + 4.0 * Math.random());

      varFunc = VariationFuncList.getVariationFuncInstance("spherical3D_wf", true);
      if (invert) {
        varFunc.setParameter("invert", 1);
      }
      xForm.addVariation(1.0, varFunc);
      XFormTransformService.rotate(xForm, Math.random() < 0.5 ? 90.0 : -90.0, false);
      XFormTransformService.globalTranslate(xForm, 1.0, 0.0, false);

      xForm.setColor(1.0);
      xForm.setColorSymmetry(0.9 + Math.random() * 0.1);
    }
    // 2nd xForm
    XForm xForm2;
    {
      XForm xForm = xForm2 = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5 + Math.random() * 4.5);
      varFunc = VariationFuncList.getVariationFuncInstance("spherical3D_wf", true);
      if (invert) {
        varFunc.setParameter("invert", 1);
      }
      xForm.addVariation(1.0, varFunc);
      XFormTransformService.rotate(xForm, 90.0, false);
      xForm.setColor(0.5);
      xForm.setColorSymmetry(0.9 + Math.random() * 0.1);
    }

    String cylinderVar = Math.random() < 0.5 ? "cylinder" : "cylinder_apo";

    // 3rd xForm
    String fncList[] = { "bipolar", "blade", "blur", "blur3D", "cannabiscurve_wf", "crackle", "cylinder", "cylinder_apo", "edisc", "flower", "glynnSim2",
        "julia3D", "mandelbrot", "modulus", "noise", "parabola", "pie", "pie3D", "checks", "pre_subflame_wf", "radial_blur", "rays",
        "rings", "rose_wf", "secant2", "sinusoidal", "spiral", "spirograph", "splits", "square", "twintrian", "wedge_julia" };
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      xForm.addVariation(0.25 + 0.25 * Math.random(), VariationFuncList.getVariationFuncInstance("pre_blur", true));
      xForm.addVariation(0.01 + Math.random() * 0.39, VariationFuncList.getVariationFuncInstance("ztranslate", true));
      String fnc = Math.random() < 0.66 ? cylinderVar : fncList[(int) (Math.random() * fncList.length)];
      xForm.addVariation(0.01 + Math.random() * 0.39, VariationFuncList.getVariationFuncInstance(fnc, true));
      XFormTransformService.scale(xForm, 5.0, false, true, true);
      xForm.setColor(1.0);
      xForm.setColorSymmetry(-1.0);
    }

    // 4th xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      xForm.addVariation(0.025 + 0.025 * Math.random(), VariationFuncList.getVariationFuncInstance("pre_blur", true));
      xForm.addVariation(0.01 + Math.random() * 0.39, VariationFuncList.getVariationFuncInstance("ztranslate", true));
      String fnc = Math.random() < 0.33 ? cylinderVar : fncList[(int) (Math.random() * fncList.length)];
      xForm.addVariation(0.01 + Math.random() * 0.39, VariationFuncList.getVariationFuncInstance(fnc, true));
      XFormTransformService.scale(xForm, 3.0, false, true, true);
      xForm.setColor(1.0);
      xForm.setColorSymmetry(-1.0);
    }

    // 5th xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.1);
      xForm.addVariation(0.005 + Math.random() * 0.005, VariationFuncList.getVariationFuncInstance("gaussian_blur", true));
      xForm.addVariation(0.005 + Math.random() * 0.005, VariationFuncList.getVariationFuncInstance("ztranslate", true));
      XFormTransformService.globalTranslate(xForm, 0.3, 0.0, true);
      xForm.setColor(1.0);
      xForm.setColorSymmetry(-1.0);
    }
    // 6th (final) xForm
    if (Math.random() < 0.5) {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
      xForm.setWeight(0.1);
      int power;
      int style = (int) (3 * Math.random());
      switch (style) {
        case 0:
        case 1:
          varFunc = VariationFuncList.getVariationFuncInstance(style == 1 ? "julia3D" : "julia3Dz", true);
          power = -4 + (int) (Math.random() * 9.0);
          varFunc.setParameter("power", power != 0 ? power : 0);
          if (Math.random() > 0.5) {
            xForm.addVariation(0.005 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("linear3D", true));
          }
          break;
        default:
          varFunc = VariationFuncList.getVariationFuncInstance("spherical3D_wf", true);
          if (Math.random() < 0.5) {
            varFunc.setParameter("invert", 1);
          }
      }
      xForm.addVariation(0.25 + Math.random() * 0.75, varFunc);

      XFormTransformService.rotate(xForm, 45.0, false);
View Full Code Here

    flame.setPixelsPerUnit(200);
    layer.getFinalXForms().clear();
    layer.getXForms().clear();
    flame.setPreserveZ(true);

    VariationFunc varFunc;
    // 1st xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5);
      int varId = (int) (Math.random() * 6.0);
      switch (varId) {
        case 0:
          varFunc = VariationFuncList.getVariationFuncInstance("fract_dragon_wf", true);
          varFunc.setParameter("scale", 2.0);
          varFunc.setParameter("xmin", -2.0);
          varFunc.setParameter("xmax", 2.0);
          varFunc.setParameter("ymin", -2.0);
          varFunc.setParameter("ymax", 2.0);
          varFunc.setParameter("xseed", -1.0 + 2.0 * Math.random());
          varFunc.setParameter("yseed", -1.0 + 2.0 * Math.random());
          break;
        case 1:
          varFunc = VariationFuncList.getVariationFuncInstance("fract_julia_wf", true);
          varFunc.setParameter("scale", 2.0);
          varFunc.setParameter("xmin", -2.0);
          varFunc.setParameter("xmax", 2.0);
          varFunc.setParameter("ymin", -2.0);
          varFunc.setParameter("ymax", 2.0);
          varFunc.setParameter("xseed", -1.0 + 2.0 * Math.random());
          varFunc.setParameter("yseed", -1.0 + 2.0 * Math.random());
          break;
        case 2:
          varFunc = VariationFuncList.getVariationFuncInstance("fract_pearls_wf", true);
          varFunc.setParameter("scale", 2.0);
          varFunc.setParameter("xmin", -2.0);
          varFunc.setParameter("xmax", 2.0);
          varFunc.setParameter("ymin", -2.0);
          varFunc.setParameter("ymax", 2.0);
          varFunc.setParameter("xseed", -1.0 + 2.0 * Math.random());
          varFunc.setParameter("yseed", -1.0 + 2.0 * Math.random());
          break;
        case 3:
          varFunc = VariationFuncList.getVariationFuncInstance("fract_salamander_wf", true);
          varFunc.setParameter("scale", 2.0);
          varFunc.setParameter("xmin", -2.0);
          varFunc.setParameter("xmax", 2.0);
          varFunc.setParameter("ymin", -2.0);
          varFunc.setParameter("ymax", 2.0);
          varFunc.setParameter("xseed", -1.0 + 2.0 * Math.random());
          varFunc.setParameter("yseed", -1.0 + 2.0 * Math.random());
          break;
        case 4:
          varFunc = VariationFuncList.getVariationFuncInstance("fract_mandelbrot_wf", true);
          break;
        default:
          varFunc = VariationFuncList.getVariationFuncInstance("fract_meteors_wf", true);
          break;
      }
      if (Math.random() < 0.8) {
        double scale = 3 + Math.random() * 3;
        double xmin = -1.0 + 2.0 * Math.random();
        double ymin = -1.0 + 2.0 * Math.random();
        double xmax = xmin + 4.0 / scale;
        double ymax = ymin + 4.0 / scale;

        varFunc.setParameter("xmin", xmin);
        varFunc.setParameter("xmax", xmax);
        varFunc.setParameter("ymin", ymin);
        varFunc.setParameter("ymax", ymax);
        varFunc.setParameter("offsetx", -(xmax - xmin) * 0.5);
        varFunc.setParameter("offsety", -(ymax - ymin) * 0.5);
        varFunc.setParameter("scale", 2.0 * scale);

      }
      varFunc.setParameter("scalez", 1.0 + Math.random() * 10.0);
      xForm.addVariation(1.0, varFunc);
    }
    // final
    if (Math.random() < 0.75) {
      XForm xForm = new XForm();
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.variation.VariationFunc

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.